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