MySQL Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 4.00

mysqlimport - Loading Data from Files

This section provides some tutorial examples on how to use mysqlimport tool to load data of to tables on a MySQL server from data files.

What Is mysqlimport? mysqlimport is a tool to load data stored in files into tables. Data should be stored in files as tab delimited values. Data file names without extensions should match table names. The command line syntax of mysqlimport is:

\mysql\bin\mysqlimport db_name file_1, file_2, ...

For example, I used the following command to load data back into the book table. Remember the data was dumped earlier by the mysqldump command with the --tab option.

\mysql\bin\mysqlimport Library Library\book.txt

Library.book: Records: 3  Deleted: 0  Skipped: 0  Warnings: 0

Sections in This Chapter

List of MySQL Programs

mysqld - The MySQL Server Program

mysqladmin - The Client Tool for Administrators

mysql - The Client Tool for End Users

Using mysql to Run SQL Statements

mysqldump - Dumping Data to Files

mysqlimport - Loading Data from Files

Dr. Herong Yang, updated in 2009
mysqlimport - Loading Data from Files