The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Upgrading MySQL

Discussion in 'Database Discussions' started by petru, Mar 17, 2014.

  1. petru

    petru Active Member

    Joined:
    Jul 12, 2013
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hey Guys, We're currently running MySQL 5.1, We've done quite a few updates today.
    We are now running Apache 2.4 and PHP 5.4

    We'd like to upgrade to MySQL 5.6 but I'm uncertain about how it will turn out.
    I would gather I could jump from 5.1 to 5.6 and the installation will automatically compile itself for each version We missed. But the main question is, How safe is it to upgrade MySQL? The server is a shared hosting environment.
    As far as I know all clients are running Wordpress, which are up to date. just want to make sure we're not going to have many problems with the upgrade.

    Any info would be appreciated. There is also a 5.5 option to. so if that's a more stable release We can just install that one.

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Ensure you use Web Host Manager to upgrade MySQL:

    "WHM Home » Software » MySQL Upgrade"

    This takes you through each step and lists potential issues that might arise when upgrading to a newer version.

    Thank you.
     
  3. petru

    petru Active Member

    Joined:
    Jul 12, 2013
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi Michael. You may have read through my post a little too fast. It wasn't exactly the question I asked :)
     
  4. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    I would say that it's generally safe to jump from MySQL 5.0 or 5.1 to 5.5, but I wouldn't go directly to 5.6 Go to 5.5 first.

    The main issue I've seen with upgrading to 5.5 is the lack of compatibility with certain my.cnf options. So go through /etc/my.cnf first and make sure you don't have anything legacy in there - primarily:

    *safe-show-database
    *anything with set-variable= in front of it

    If there are issues, MySQL will still upgrade but will likely either not start properly, or spit out errors. Once you get them resolved just start it up and run:

    mysql_upgrade

    This will upgrade your tables. The you can proceed with upgrading to 5.6.

    Do note that upgrading MySQL will break PHP since it's compiled against the current version's client libraries. I wrote a quick script a while back to prevent PHP from having these issues, though it's only an interim fix to keep your sites up until you're able to recompile. You can find the script here:

    Upgrading MySQL Without Breaking PHP :: The cPanel Admin

    As far as application compatibility, that shouldn't be too difficult to confirm with the vendors of whatever you're running, unless it's a custom app.

    Hope that answers your question.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, it's generally safe to upgrade MySQL, but it's important to use the option I referenced:

    "WHM Home » Software » MySQL Upgrade"

    This will take you through all of the steps, including running EasyApache to ensure PHP is built against the new version.

    Thank you.
     
Loading...

Share This Page