Edward Dekker
Basic Pleskian
CentOS 7 is shipped with MariaDB. MariaDB 10.x version is a drop-in replacement for MySQL 5.5-5.7.
Open the SSH terminal by the root user and/or sudo with your username if you have rights to upgrade:
Code:
Domain / IP adress : Portnumber : Username & Password
Create a backup of all databases with the following command:
Code:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
Copy a databases directory in a separate folder like this (for backup purposes also):
Code:
cp -a /var/lib/mysql/ /var/lib/mysql_backup
Add Yum packages:
Code:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
Update your CentOS 7 installation by Yum:
Code:
yum -Y Update
Check the Status of MariaDB:
Code:
service mariadb status
Start the MariaDB service:
Code:
service mariadb start
Upgrade the databases:
Code:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
Code:
service mariadb restart
Execute this command to update the package version inside Plesk:
Code:
plesk sbin packagemng -sdf
Note: After an upgrade to 10.1 version, there may appear 'mysql' init script. It can be removed:
Code:
rm /etc/init.d/mysql
systemctl daemon-reload
Check your status for a last time to confirm the upgrade:
Code:
service mariadb status
Check tables and auto-fix your databases by your server.
Code:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck --all-databases --analyze --auto-repair --verbose -u admin
Create an event at Plesk to upgrade your databases by a new releasenumber of the database server and restart atomatic, and check MariaDB server for faults.
Last edited: