It’s easy very easy. Just look:

mysqldump -u root -p1234 -h remotehost database > backup.sql

File backup.sql will save on your computer in home direcory.Next step: how to import this database on your local machine?

Quiet simple: mysql -u localuser -p localpass -h localhost database < backup.sql

Advertisements