Solved

Replication / Migration to MySQL 5.x

Posted on 2006-11-04
5
260 Views
Last Modified: 2012-06-27
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


0
Comment
Question by:rjohnsonjr
  • 2
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
ID: 17874799
Hi,

This would be the best approach - unfortunatley if you are migrating there will be some cost with respect to time.

The only thing that I would mention is that yo uneed to configure the two 5.x servers to perform replication at some point - just because they have the same data is not enough.  I would set it up - and test it - then stop all 4 instances of mysql  - get the data from the 4.x databases to the 5.x ones - then start the 5.x ones and then the replication should be working
0
 
LVL 14

Expert Comment

by:racek
ID: 17875690
0
 
LVL 4

Expert Comment

by:Sheeri
ID: 17895459
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.

0
 
LVL 14

Expert Comment

by:racek
ID: 17896422
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17896450
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.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now