Plesk centos update to mysql 5.6 oder higher

If you like to upgrade your mysql installation to a newer version you may try this:

First of all we need to add a repo with contains the new mysql version. I’ve chose the one of the IUS Community

Then we need to check what currently is installed:
# rpm -qa | grep mysql
mysql-server-5.5.48-1.el6.remi.x86_64
plesk-mysql-server-12.5.30-cos6.build1205150826.19.x86_64
mysql-libs-5.5.48-1.el6.remi.x86_64
mysql-5.5.48-1.el6.remi.x86_64
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
php-mysqlnd-5.6.19-1.el6.remi.x86_64

We need to remove the old stuff. Be sure to select only the parts we can really get rid off 🙂 Never every remove the one which starts with plesk-mysql-server !

rpm -e --nodeps mysql-server-5.5.48-1.el6.remi.x86_64 mysql-libs-5.5.48-1.el6.remi.x86_64 mysql-5.5.48-1.el6.remi.x86_64 compat-mysql51-5.1.54-1.el6.remi.x86_64 compat-mysql51-5.1.54-1.el6.remi.x86_64

Now install the new one. In my case I want mysql 5.7:
yum install mysql57u-server.x86_64 mysql57u.x86_64

Since the databases are in the old format we need to upgrade them to work with the new server version:
mysql_upgrade -u admin -p`cat /etc/psa/.psa.shadow`

This may take a while. After that you should restart the mysql server.

If you every modified /etc/my.cnf you may should have a look since it may reset to the defaults. But don’t worry. The original one should be saved to my.cnf.rpmsave (or something similar).

That’s it!