How To Import and Export Databases in MySQL

Export
#mysqldump -u [username] -p [database name] > [database name].sql

Import
#CREATE DATABASE newdatabase;

Then log out of the MySQL shell and type the following on the command line:
#mysql -u [username] -p newdatabase < [database name].sql

Reference :
Digitalocean

Leave a Reply

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