petru

Active Member
Jul 12, 2013
38
1
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
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
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.
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
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.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hi Michael. You may have read through my post a little too fast. It wasn't exactly the question I asked :)
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.