Export and import Database in MySQL
Export
mysqldump -u username -p database_name > dump_name.sql
-
username
is the username which will be used for export; -
database_name
is the name of the database you want to export; -
dump_name.sql
is the file name in the current directory that will store your dump;
Import
mysql -u username -p new_database < dump_name.sql