MySQL Tutorials - Herong's Tutorial Examples - Version 4.20, by Dr. Herong Yang
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:
C:\herong>set "MySQL=\Program Files\MySQL\MySQL Server 5.7" C:\herong>%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.
C:\herong>%MySQL%\bin\mysqlimport Library Library\book.txt Library.book: Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
Last update: 2015.
Table of Contents