Link to home
Start Free TrialLog in
Avatar of Randy Johnson
Randy JohnsonFlag for United States of America

asked on

Replication / Migration to MySQL 5.x

Hello,

I have 2 servers.

1 server is running MySQL 4.x in production.


I want to install 5.x on both servers, get replication working and then Migrate the databases over to 5.x.

At first I thought I was going to be able to shutdown 4 copy over the files to the 5.x directory and it would replicate but that is not the case because there would be no bin log for it to replicate on server 2.

So I was thinking the best way to do this would get replication working.  Then

1.  Shut down all instances of MySQL.  
2.  Copy the Databases into the 5.x mysql data directory,
3.  then copy them to the server 2 Mysql 5 directory
4.  then restart 5.x instances of MySQL and replication would be up and running from server 1 to server 2

Does this sound right?   Is there an easier way?

I need downtime to be a complete minimum that is why I want to do it this way.

Thanks!

Randy


ASKER CERTIFIED SOLUTION
Avatar of Raynard7
Raynard7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sheeri
Sheeri

Have you checked the release notes for 5.0?  You're not supposed to upgrade without actually checking your code; there are incompatible changes.

you have to read this page and all the relevant links on it:
http://dev.mysql.com/doc/refman/5.0/en/news-5-0-x.html

ie
http://dev.mysql.com/doc/refman/5.0/en/news-5-0-0.html
and
http://dev.mysql.com/doc/refman/5.0/en/news-5-0-1.html
etc.

Well,

If you were doing this properly then you would actually have a migration plan and testing before the migration.

You could take a hot backup of your database,

Implement both systems - test your application for speed, performance - reliability - data accuracy and configure the servers accordingly for replication, then when you are ready to go live turn your production databases off - dump the data - load it into your mysql 5 boxes - switch the configuratoin for anything so it is now pointing to the new databases and then off you go.

Taking into account everything above - without testing there is nothing to ensure that everything will work correctly  - even after taking into account the above articles.