DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Migrate A MySQL Database To Another Server

08.19.2006
| 8599 views |
  • submit to reddit
        Use the below in SSH to move a MySQL database between servers. Super handy if the database is larger than 7MB and you can't use phpMyAdmin.

mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname     

http://wiki.dreamhost.com/index.php/Migrate_MySQL