Transfer database from one server to another

Some times you want to copy a database from one server to another. This is painful and found a easy way to do it from a few other blogs

 

$ mysqldump -u username -p'password' db-name | ssh user@remote.box.com mysql -u username -p'password db-name

 

 

Advertisements