Home >> FAQs/Tutorials >> MySQL Tutorials

MySQL Tutorial - Loading Data Files with "mysqlimport" Command

By: FYIcenter.com

(Continued from previous topic...)

How To Load Data Files into Tables with "mysqlimport"?

If you want to load a data file directly into a table, you need to prepare the data file as one line per data row, and use tab character as the column delimiter. The data file name should match the target table name. The following is a good tutorial exercise on using "mysqlimport":

>cd \mysql\bin
>type \temp\links.tab

>mysqlimport -u root test \temp\links.tab
test.links: Records: 2  Deleted: 0  Skipped: 0  Warnings: 0

>mysql -u root -e "SELECT * FROM links" test
| name              |
| dba.fyicenter.com |
| dev.fyicenter.com |
| www.mysql.com     |

  1. What Tools Available for Managing MySQL Server?
  2. What Is "mysqld"?
  3. What Is "mysqladmin"?
  4. How To Check Server Status with "mysqladmin"?
  5. How To Shut Down the Server with "mysqladmin"?
  6. What Is "mysql"?
  7. How To Use "mysql" to Run SQL Statements?
  8. How To Show All Tables with "mysql"?
  9. What Is "mysqlcheck"?
  10. How To Analyze Tables with "mysqlcheck"?
  11. What Is "mysqlshow"?
  12. How To Show Table Names with "mysqlshow"?
  13. What Is "mysqldump"?
  14. How To Dump a Table to a File with "mysqldump"?
  15. What Is "mysqlimport"?
  16. How To Load Data Files into Tables with "mysqlimport"?

MySQL Tutorials:


Other Tutorials/FAQs:


Related Resources:


Selected Jobs: