2009
04.09

To migrate DB from one MySQL to another over network or Internet you can use following command:

user@computer:$ mysqldump --opt --user=SRC_USER --password=SRC_PASSWORD SRC_DB_NAME | mysql --user=DEST_USER --password=DEST_PASSWORD --host=DEST_HOSTNAME -C DEST_DB_NAME

If the DB is big you can have problems using that command, you should use this method instead:

user@computer:$ mysqldump --opt --user=SRC_USER --password=SRC_PASSWORD SRC_DB_NAME > dump.sql

Then copy dump.sql via scp or anything else you prefer.

Log in on remote server and import DB:

user@computer:$ mysql --user=DEST_USER --password=DEST_PASSWORD --host=DEST_HOSTNAME -C DEST_DB_NAME < dump.sql
Bookmark and Share

No Comment.

Add Your Comment