Plesk

Database Server – Using MariaDB or Percona as the Default Database Server

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:

  1. Back up databases located on your MySQL server. Use one of the
    following commands:

    • To back up all databases:

      # mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` --all-databases | gzip > /root/mysql.all.dump.sql.gz
      
    • To back up only data required by Plesk:

      # mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` --databases mysql psa apsc | gzip > /root/mysql.mysql-psa-apsc.dump.sql.gz
      
  2. Configure the MariaDB repository on your server. To generate the
    repository configuration for your operating system, use the wizard
    available at https://downloads.mariadb.org/mariadb/repositories/.
    When selecting the MariaDB version, choose the version not less than
    your current MySQL version. The versions of MariaDB currently
    supported by Plesk are 5.5, 10.0, and 10.1.

    Note: Once you install MariaDB, do not disable this repository on your
    server. Plesk requires it for updates.

  3. Stop the Watchdog Plesk extension if it is installed on your server
    and stop other monitoring services that can start the mysql
    service once you stop it manually.

  4. Install MariaDB using one of the instructions provided below.

  5. Switch on Watchdog and start other services you stopped in step 3.

  6. Notify Plesk about the changes in the MySQL component:

    plesk sbin packagemng --set-dirty-flag
    
  7. (Optional) 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 CentOS or RedHat:

  1. Stop the mysql service:

    service mysqld stop
    
  2. Remove the MySQL server from your server:

    <div…