FAQ: Mysql import and export database from command line

mysql-logo

Import a Mysql file to a database

Hit enter after entering above command in your terminal. You will be asked for MySql password. Note that mentioned database must be already available in mysql.

Export a Mysql database to sql file

To export your mysql database to a sql file use the following command:

Hit enter and a sql file will be generated for you.