thehenrys.net

May 22, 2008

Dump one MySQL database to another MySQL database

Filed under: Programming,Server Admin — dh @ 1:28 am

mysqldump -u[uname] -p[password] [table] | mysql -u[uname] -p[password] –host=[ip address] -C [table]

I.E.: mysqldump -umy_user_name -pmy_secret_password foo_table | mysql -umy_2nd_user_name -pmy_2nd_secret_password –host=1.1.1.1 -C foo_table

(whole command should be on one line of course.) 🙂

Leave a Reply