mysql replication

Posted on 2014-08-29
Last Modified: 2014-08-29
Hi, it's been about 5+ years since I setup a master/slave mysql setup and have a few question.

1. The primary mysql server is running version 4. This is our production server. It's 4 because of old PHP code. Work won't let me spend the time to convert so it's 4 until their is a major problem.

2. I setup a new mysql server to run some off production reports, etc. However, I have to manually dump the data from the mysql 4 server then import into the mysql 5 server.

What is the best way to replicate mysql 4 database to a mysql 5 database. I want to automate this task maybe once per week.
Question by:Robert Saylor
    LVL 6

    Accepted Solution

    If you are going to do it once a week.  I would say use mysqldump to dump from the old one and import into the new one.
    LVL 6

    Author Comment

    by:Robert Saylor
    I was looking for more of an mysql way. With that I would write a shell script to dump the DB, scp it, then import. This I already do was wondering of mysql replication would work and if I can set a time on it.
    LVL 34

    Assisted Solution

    What specific versions are you using?

    MySQL replication is real-time. It's not a recurring task. In most cases, you can replicate from an older master to a newer slave, but some versions may have problems. Check this article:

    If I were in your spot, I'd search around security blogs for problems with your current MySQL version to get some justification to move up to version 5. Sometimes the business logic of a company doesn't really see the importance of staying up to date, or the future problems with developing against older versions. But they will often pay attention to the possibilities of security breaches.
    LVL 6

    Author Comment

    by:Robert Saylor
    Old server is 4.1.22-standard-log, new server is 5.1.73 Source distribution.

    Yea I did some research and looks like mysql only supports going 1 level up. I think the 5.1.73 is a little more then 1 level. I am writting a shell script to do it with mysqldump now.
    LVL 6

    Author Closing Comment

    by:Robert Saylor
    mysqldump ultimately is the solution but the link on oracle confirmed the way I wanted to do it would not work.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
    I have been using r1soft Continuous Data Protection ( for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    729 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

    21 Experts available now in Live!

    Get 1:1 Help Now