sourcecode

Thursday, June 28, 2012

Migrate MySQL database to a new server

How to move/copy/backup MySQL database to another server? Use mysqldump and ssh:

http://www.cyberciti.biz/faq/transferring-mysql-database-tables/
http://www.devshed.com/c/a/MySQL/Backing-up-and-restoring-your-MySQL-Database/

#mysqldump -u sqluser1 -psqlpass1 database1 |ssh sshuser@server2.com mysql -u sqluser2 -psqlpass2 thedatabase2
Then the terminal pops password entry for ssh for sshuser on server2.com

/******************END**************/

No comments: