Dump a db with:

mysqldump -h<host-or-ip> -u<username> -p<password> <db-name> > dump.sql

To import, first create the target db, then import the dump with:

mysql -h<host-or-ip> -u<username> -p<password> <db-name> < dump.sql

Yep, its that easy.

blog comments powered by Disqus