Tuesday, March 2, 2010

How to Migrate a Mysql Database with a simple method

If you want to migrate your Mysql Server, you want to export data from one MySQL server to another server, and then import the data to a new server,

It is very simple

Log in to First Server and give  the following command:

$ mysqldump -u root -p database-name >  filename.sql

 Now Copy the file to second server using FTP, SSH or with a USB Pendrive

On the second Server, you can import the data with the following command:

$ mysql -u root -p -D database-name <  filename.sql

No comments: