In addition to databases that store websites data, Plesk has its own database for storing information about customer and resellers accounts, their subscriptions, and so on. This database is called psa and located on the local MySQL server. The local MySQL server is installed together with Plesk and is required for Plesk functioning. However, since version 11.5, you can replace the local MySQL server with an alternative database server, for example, MariaDB (https://mariadb.org) or Percona Server (http://www.percona.com/software/percona-server)
Below in this section we will explain how to replace MySQL with MariaDB. For other MySQL replacements, instructions are basically the same.
Below we will provide instructions on replacing MySQL server with MariaDB server. For Percona Server, the steps are the same, the only differences are in configuring repositories and package names.
To replace your MySQL server with MariaDB:
# mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` --all-databases | gzip > /root/mysql.all.dump.sql.gz
# mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` --databases mysql psa apsc | gzip > /root/mysql.mysql-psa-apsc.dump.sql.gz
Note: Once you install MariaDB, do not disable this repository on your server. Plesk requires it for updates.
mysql
service once you stop it manually.plesk sbin packagemng --set-dirty-flag
zcat /root/mysql.all.dump.sql.gz | mysql -uadmin -p`< /etc/psa/.psa.shadow `
To install MariaDB on CentOS or RedHat:
mysql
service:service mysqld stop
rpm -e --nodeps `rpm -q --whatprovides mysql-server`
Note: This will not remove any Plesk packages except plesk-mysql.
yum shell
> remove mysql mysql-server plesk-mysql
> install MariaDB-server MariaDB-client MariaDB-compat MariaDB-shared
> run
/etc/my.cnf
with the the MariaDB server's default one. This step is required if you are not sure that MariaDB can work with your configuration file. Usually, MariaDB is compatible with MySQL configuration files.[ -f /etc/my.cnf.rpmnew ] && mv /etc/my.cnf.rpmnew /etc/my.cnf
service mysql start
mysql_upgrade -uadmin -p`< /etc/psa/.psa.shadow `
If you experience MySQL errors after updating, restore the backup you created in step 1:
zcat /root/mysql.all.dump.sql.gz | mysql -uadmin -p`< /etc/psa/.psa.shadow `
To install MariaDB on Debian or Ubuntu:
apt-get update
env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 install mariadb-server mysql-common libmariadbclient18
env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 install mariadb-server mysql-common
env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 install mariadb-server mysql-common libmariadbclient16
Note: If during the installation the system asks you to provide the MariaDB password, leave it empty. Otherwise, Plesk will be unable to access the MariaDB server and installation will fail.
To perform a clean installation of Plesk with MariaDB:
If MySQL is not installed on the server, it is enough to run the following command:
yum install MariaDB-server MariaDB-client MariaDB-compat
apt-get install mariadb-server