Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Upgrading MySQL

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

  1. petru

    petru Active Member

    Joined:
    Jul 12, 2013
    Messages:
    38
    Likes Received:
    1
    Trophy Points:
    8
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,216
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. petru

    petru Active Member

    Joined:
    Jul 12, 2013
    Messages:
    38
    Likes Received:
    1
    Trophy Points:
    8
    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:
    834
    Likes Received:
    29
    Trophy Points:
    178
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,216
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice