TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

MySQL

Import Data Using MySQLImport Utility

Overview

In this tutorial, we will learn about mysqlimport utility. The mysqlimport client program loads data
into database tables in various formats. It provides a command line interface to the LOAD DATA INFILE statement.

https://www.testingdocs.com/mysql-load-data-infile-statement/

MySQLImport

mysqlimport connects to the MySQL server and, for each input file, issues a LOAD DATA INFILE statement that loads the file into the appropriate database table. Each table to be loaded by mysqlimport must already exist, and each input file should contain only data values. By default, input files for mysqlimport are assumed to contain lines terminated by newlines, with each line containing tab-separated data values. This is the same default format assumed by the LOAD DATA INFILE statement.

Help options

Invoke mysqlimport with the –help option to see a complete list of the options. To know the command line options of mysqlimport program.

>mysqlimport –help

Usage

The mysqlimport examines the options given on the command line. We can invoke the mysqlimport from the command line as follows:

> mysqlimport [OPTIONS] database_name  input_textfile…

 

mysqlimport utility options

The database_name is the database containing the table to be loaded and the input_file is the file that contains the data to be loaded. We can provide several input files following the database name.

The mysqlimport command uses each filename to determine the name of the corresponding target database table into which the file’s contents should be loaded. The program strips
the filename extension and uses the result as the table name.

For example, mysqlimport treats a file named Actor.txt as input to be loaded into a database table
named Actor. After determining the table name corresponding to the filename, the mysqlimport issues
a LOAD DATA INFILE statement to load the file into the corresponding database table.

—

MySQL Tutorials

MySQL Tutorials on this website:

https://www.testingdocs.com/mysql-tutorials-for-beginners/

For more information on MySQL Database:

https://www.mysql.com/

Related Posts

DataGrip Desktop Shortcut

MySQL /

Launch DataGrip on Windows

DataGrip Download

MySQL /

Install DataGrip IDE on Windows 11

MySQL Workbench Windows 11

MySQL /

New MySQL Connection in Workbench

MySQL Command-line Client

MySQL /

Command-Line MySQL Client

Start MySQL Client

MySQL /

Start MySQL Client on Windows 11

‹ MySQL mysqldump Export› MySQL SELECT Statement

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version