Friday, July 21, 2017 10:31 am EDT

MySQL blog posts

Bri's picture

MySQL Export/Import Command Line Syntax

If you are like me, occasionally you find yourself working with a database that is so large it's pretty much impossible to do any importing/exporting with the GUI tools. It doesn't happen often enough for myself to have the MySQL commands memorized, so I'm putting them here so I can find them again later.

Exporting using mysqldump

mysqldump –u mysqlUser -p DatabaseName TableName > FilenameToSaveAs 

Importing the same file

mysql –u mysqlUser -p DatabaseName < FilenameToImport