How to migrate entire MySQL database from 32 bit Linux server to 64 bit Linux server

No GoodNeed ImprovementOKGoodExcellent (1 votes, average: 5 out of 5)
Loading ... Loading ...

If you want to copy database from one server to another server with the same OS and same MySQL version, you can simply copy the binary files.

1, Shutdown Apache and MySQL

apachectl stop
mysqladmin -uroot -p shutdown

2, Go to your database file directory and make a tar ball:

tar cvf db.tar *

3, Copy tar file to proper directory on another server and restart MySQL

scp root@anotherserver:/disk2/mysqldb/db.tar .

Start MySQL and Apache

mysqld_safe &
apachectl start

But if you want to migrate database from 32 bit Linux server to 64 bit Linux server, you need to do the following.

1, Export database using mysqldump on 32 bit server

mysqldump -uroot -p --all-databases > db.dump

2, Copy dump file to 64 bit server

scp root@32bitserver:/disk2/mysqldb/db.dump .

3, Import database on 64 bit server

mysql < db.dump

Technorati :

Popularity: 1%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word