MySQL export and import database from command line
This is how to export and import a MySQL database from the command line
Export
mysqldump -u root -p mydatabase | gzip -9 > /home/myuser/mydatabase.sql.gz
press enter and you will be asked for root password
Import
gunzip < /home/myuser/mydatabase.sql.gz | mysql -u root -p mydatabase
press enter and the database will be imported to mydatabase database.