Replace username, password and database_name with your MySQL username, password and database name.
File FILE.sql now holds a backup of your database, download it to your computer.
2. Import A MySQL Database
Here, we import a database. Use this to restore data from a backup or to import from another MySQL server.
Start by uploading the FILE.sql file to the server where you will be running this command.
# mysql -u username -ppassworddatabase_name < FILE.sql
Replace the parts in bold with your own information.
This powerful, easy to use command has many uses. Let's say you wanted to switch to HostNine. Simply export your data on the old provider's server and import it on your account with the new host.