Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between mysqlimport and mysql < dbfile.sql

Tags:

It's basically this - I was used to using mysql < dbfile.sql to restore a database dump created with mysqldump. Then I saw there is mysqlimport, with no reference to the other way. The arguments of both CLIs look similar. So, what's the actual difference? (And is there any)

like image 762
Bozho Avatar asked Dec 31 '09 10:12

Bozho


People also ask

What is Mysqlimport?

5 mysqlimport — A Data Import Program. The mysqlimport client provides a command-line interface to the LOAD DATA SQL statement. Most options to mysqlimport correspond directly to clauses of LOAD DATA syntax.

How do I import data into MySQL?

Importing a database from a file To import a file, open Workbench and click on + next to the MySQL connections option. Fill in the fields with the connection information. Once connected to the database go to Data Import/Restore. Choose the option Import from Self-Contained File and select the file.


1 Answers

My understanding is that mysqlimport is the equivalent of LOAD DATA INFILE, so the data to be loaded must be e.g. in CSV format, not the usual output of mysqldump.

like image 65
Mirko N. Avatar answered Sep 23 '22 13:09

Mirko N.