Updating MariaDB on Plesk Sever on Cloud Linux OS 7

Karl Is WrightDIY, Fixes, Networking, Uncategorized


On my Plesk server, I was trying to solve an issue with the WordPress-Toolkit Cloning feature. According to support, they found the error to be;

 ERR [panel] Task failed: id=203, pid=3055, type=ext-wp-toolkit-task\manage, error=Unable to import database. Error message: ERROR 1273 (HY000) at line 25 in file: '/var/www/vhosts/xxxxxx/httpdocs/db_3_yi8u7i1j6c.sql': Unknown collation: 'utf8mb4_unicode_520_ci'


So the WordPress Instance I was trying to copy to a staging subdomain was using a collation type that was newer that that supported by the version of MariaDB on my server. The solution was to upgrade MariaDB.



First, check to see which version of MariaDB you have, using;


# mysql -V
mysql  Ver 15.1 Distrib 5.5.52-MariaDB, for Linux (x86_64) using readline 5.1



Now we stop the service;

# systemctl mariadb stop


Copy the database directory;

# cp -a /var/lib/mysql/ /var/lib/mysql_bakup


Now we need to install MySQL Governor if it isn’t already installed;

# yum install governor-mysql-y

If it’s already installed, then it will just say that there’s nothing to do.


Now we select the version of MariaDB that we want. As of now, 10.1 is the latest version supported by Plesk.

/usr/share/lve/dbgovernor/db-select-mysql --mysql-version=mariadb101
/usr/share/lve/dbgovernor/mysqlgovernor.py --install

you can install other versions of MariaDB by replacing 101 with any of these numbers;

55 MariaDB v5.5

100 MariaDB v10.0

101 MariaDB v10.1


Wait until it is done.


Now we update the Plesk Package Manager so it sees the change.

plesk sbin packagemng -sdf


A note;

*** MySQL Governor is compatible only with MySQL 5.x & MariaDB.



How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.0/10.1/10.2 on Linux

CloudLinux Documentation