How to upgrade MySQL from 5.1 to 5.5 in Plesk server?

We all are familiar with the control panel Plesk. It’s one of the commonly using web hosting control panel in hosting industry. Plesk works on both Linux and Windows platform. In this blog post we discuss about the steps to upgrade MySQL version from native 5.1 to 5.5.

Here we’re considering a Plesk server with 12.5 version with CentOS 6 OS. By default the Plesk 12.5 comes with MySQL version 5.1. We all know MySQL 5.1 is an EOL version and it’s time for an upgrade.

Yeah, let’s do the upgrade 🙂

plesk

MySQL upgrade can’t be done from Plesk auto-installer as MySQL 5.5 isn’t listed in its base repository. Hence we need a third party repo and that’s from Atomic repo.

Upgrade steps

Make sure that you have backups of all databases on your server. This would help you if there are any problems with this MySQL version upgrade.

Step 1 : Download the atomic repo

# wget -q -O - http://www.atomicorp.com/installers/atomic | sh

Step 2 : Upgrade MySQL

# yum upgrade mysql
# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`

Now all your tables will get updated to the new version.

When doing mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow` if you’re getting the following errors:

Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed

Then, check the MySQL error logs in the location /var/log/mysqld.log. If the InnoDB turned corrupt, turn on innodb_force_recovery and then recover Innodb tables. Once the InnoDB problem is fixed you can proceed with the mysql_upgrade command.

Hope my post have helped you!
Let me know if you have any questions.

, ,

Post navigation

Heba Habeeb

Working as a Linux Server Admin, Infopark, Cochin, Kerala.

4 thoughts on “How to upgrade MySQL from 5.1 to 5.5 in Plesk server?

  1. I don’t often leave comments… but this process was just beautiful on a CENTOS 6 VPS running Plesk 17.5 via SSH; and it therefore warrants one. Very nice. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *