SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2008
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Upgrade MySQL 4.1 to MySQL 5.1.3x

    Hi,

    Right now our application on PHP serving customers from mysql4.1. Our database size is almost 50GB. We want to upgrade it to mysql 5.1.31 to make use of mysql clustering and partitioning. we are using replication with following topology.

    Top Master(application writes all to it) --> Master/Slave ----> 8 Slaves
    |
    |----> Master/Slave ---> 4 Slaves
    |
    |----> Master/Slave ---> 2 slaves



    I have some queries in my mind.

    1) How can we achieve minimum downtime when upgrading to mysql 5.1.
    2) What are major changes between mysql 4.1 & mysql 5.1.32 which we need to take care before upgrade.

    Regards,
    Muhammad Irfan

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the one thing that bites everyone going from 4.x to 5.x is mixing of comma delimited tables and explicit join. for example, mysql 5 errors out on a query like this:
    Code:
    select ...
      from a, b
    left outer
      join c
        on c.id = b.id
     where a.id = b.id
    you have two choices. the quick and ugly way:
    Code:
    select ...
      from (a, b)
    left outer
      join c
        on c.id = b.id
     where a.id = b.id
    or the correct way that results in a more readable query:
    Code:
    select ...
      from a
      join b
        on b.id = a.id
    left outer
      join c
        on c.id = b.id
    also, when upgrading a replication setup, generally you want to upgrade the slaves farthest away from the master first and work your way back towards the master.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •