MySQL – How to Export and Import tables with the Command Line

2 commands I use often throughout the day is importing and exporting large databases into MySQL VIA the command line. Here is how I do it where “USERNAME” is your username, “PASSWORD” is your password and “DATABASE” is your database name.

To Export:

To Import:

Also, you may have a large database that may give you errors while importing. You can use this command to force the import without warnings or errors:

2 thoughts on “MySQL – How to Export and Import tables with the Command Line”

Leave a Reply

Your email address will not be published. Required fields are marked *