MariaDB installation guide

Plesk uses MySQL as both admin and client RDBMS. Plesk 11.5 for Linux and higher allows for MySQL alternatives (such as MariaDB or Percona Server) to be used as drop-in replacements for it. Upgrade from installations with drop-in replacements is also supported.

This guide will explain in great detail how you can replace MySQL server on a Plesk installation with MariaDB server. The guide is aimed at administrators with intermediate experience and understanding of package management for their OS. Also basic experience with services management and MySQL maintenance required.

This guide is essentially a more detailed version of the official documentation page. Please read up to the end of this guide before doing any actual changes on your server.

Repositories Setup

MariaDB is available from vendor OS repositories only on SuSE 12.2 and higher. On any other OS third-party repository should be added.

Go to https://downloads.mariadb.org/mariadb/repositories/ to generate repositories configuration appropriate for your system. Simple wizard will guide you through the process. On step 3 “Choose a Version” choose 5.5 or below. Don’t attempt to install MariaDB as drop-in replacement with version less than you had (for MySQL) before! We don’t support MySQL 5.6 and drop-in replacements based on it yet as well.

Warning: Don’t disable MariaDB repository after you’ve installed it. Plesk will require it to be enabled for updates.

Installing MariaDB

Since even on a freshly installed machine you may have parts of MySQL preinstalled, we will give a single instruction for both clean installation and drop-in replacement of MySQL. Steps that require Panel to be installed may be skipped if it is not installed yet.

Before doing drop-in replacement ensure that version of MariaDB server you are about to install is either the same (preferable) as current MySQL version, or higher. After installing a drop-in replacement you may optionally execute following command to notify Panel that MySQL component was updated:

# plesk sbin packagemng --set-dirty-flag

Installing Using Yum (CentOS & RedHat)

  1. If you’re doing a drop-in replacement, backup your databases:
    # mysqldump -uadmin -p`< /etc/psa/.psa.shadow ` \
      --all-databases | gzip > /root/mysql.all.dump.sql.gz

    If you want to dump only essential data, perform following command:

    # plesk db dump mysql psa apsc | gzip > /root/mysql.mysql-psa-apsc.dump.sql.gz
  2. Enable MariaDB repository according to Repositories Setup. You may check that repository is enabled via:
    # yum repolist enabled | grep mariadb
  3. Disable WatchDog module in Panel if you have one. Disable any other custom monitoring services that may resurrect MySQL daemon if you have any.
  4. Stop MySQL daemon:
    # service mysqld stop
  5. Check if you already have mysql-server installed:
    # rpm -q --whatprovides mysql-server
    mysql-server-5.5.30-13041012

    If you do, it must be removed before installing MariaDB (in a separate transaction than MariaDB installation!):

    # rpm -e --nodeps `rpm -q --whatprovides mysql-server`
  6. Then remove any leftovers and install MariaDB packages in one transaction (only user commands and minimal output is shown):
    # yum shell
    > remove mysql mysql-server plesk-mysql
    > install MariaDB-server MariaDB-client MariaDB-compat MariaDB-shared
    > run
    Total download size: 58 M
    Is this ok [y/N]: y
    Importing GPG key 0x1BB943DB "Daniel Bartholomew (Monty Program signing key) <[email protected]>" from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    Is this ok [y/N]: y
    > exit

    Below you will find full sample transcript:

    # yum shell
    Loaded plugins: fastestmirror, security
    Setting up Yum Shell
    > remove mysql mysql-server plesk-mysql
    Setting up Remove Process
    No Match for argument: mysql-server
    Determining fastest mirrors
    base                                                   | 1.3 kB     00:00
    base/primary                                           | 980 kB     00:00
    base                                                            2771/2771
    mariadb                                                | 1.9 kB     00:00
    mariadb/primary_db                                     |  15 kB     00:00
    updates                                                | 1.9 kB     00:00
    updates/primary_db                                     | 430 kB     00:00
    Package(s) mysql-server available, but not installed.
    > install MariaDB-server MariaDB-client MariaDB-compat MariaDB-shared
    Setting up Install Process
    > run
    --> Running transaction check
    ---> Package MariaDB-client.i386 0:5.5.31-1 set to be updated
    --> Processing Dependency: MariaDB-common for package: MariaDB-client
    ---> Package MariaDB-compat.i386 0:5.5.31-1 set to be updated
    ---> Package MariaDB-server.i386 0:5.5.31-1 set to be updated
    ---> Package MariaDB-shared.i386 0:5.5.31-1 set to be updated
    ---> Package mysql.i386 0:5.5.30-13041012 set to be erased
    ---> Package plesk-mysql.i386 0:5.5-11053110 set to be erased
    --> Running transaction check
    ---> Package MariaDB-common.i386 0:5.5.31-1 set to be updated
    --> Finished Dependency Resolution
    
    =========================================================================================
     Package                    Arch             Version         Repository             Size
    =========================================================================================
    Installing:
     MariaDB-client             i386             5.5.31-1        mariadb                12 M
     MariaDB-compat             i386             5.5.31-1        mariadb               3.3 M
     MariaDB-server             i386             5.5.31-1        mariadb                41 M
     MariaDB-shared             i386             5.5.31-1        mariadb               1.3 M
         replacing  mysql-libs.i386 5.5.30-13041012
    
    Removing:
     mysql                      i386             5.5.30-13041012 installed              40 M
     plesk-mysql                i386             5.5-11053110    installed              0.0
    Installing for dependencies:
     MariaDB-common             i386             5.5.31-1        mariadb                29 k
    
    Transaction Summary
    =========================================================================================
    Install       5 Package(s)
    Upgrade       0 Package(s)
    Remove        2 Package(s)
    Reinstall     0 Package(s)
    Downgrade     0 Package(s)
    
    Total download size: 58 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/5): MariaDB-5.5.31-centos5-i686-common.rpm          |  29 kB     00:00
    (2/5): MariaDB-5.5.31-centos5-i686-shared.rpm          | 1.3 MB     00:03
    (3/5): MariaDB-5.5.31-centos5-i686-compat.rpm          | 3.3 MB     00:01
    (4/5): MariaDB-5.5.31-centos5-i686-client.rpm          |  12 MB     00:04
    (5/5): MariaDB-5.5.31-centos5-i686-server.rpm          |  41 MB     00:25
    -----------------------------------------------------------------------------------------
    Total                                         1.6 MB/s |  58 MB     00:36
    warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1bb943db
    mariadb/gpgkey                                         | 6.9 kB     00:00
    Importing GPG key 0x1BB943DB "Daniel Bartholomew (Monty Program signing key) <[email protected]>" from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    Is this ok [y/N]: y
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : MariaDB-common                                    1/8
    warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
      Installing     : MariaDB-shared                                    2/8
      Installing     : MariaDB-server                                    3/8
      Installing     : MariaDB-client                                    4/8
      Installing     : MariaDB-compat                                    5/8
      Erasing        : mysql-libs                                        6/8
      Erasing        : mysql                                             7/8
      Erasing        : plesk-mysql                                       8/8
    
    Removed:
      mysql.i386 0:5.5.30-13041012                      plesk-mysql.i386 0:5.5-11053110
    
    Installed:
      MariaDB-client.i386 0:5.5.31-1    
      MariaDB-compat.i386 0:5.5.31-1    
      MariaDB-server.i386 0:5.5.31-1
      MariaDB-shared.i386 0:5.5.31-1
    
    Dependency Installed:
      MariaDB-common.i386 0:5.5.31-1
    
    Replaced:
      mysql-libs.i386 0:5.5.30-13041012
    
    Finished Transaction
    > exit
    Leaving Shell
    #

    You can use ts command in yum shell to view current transaction contents.

  7. Optionally update configuration file (we recommend updating it, but if you have important customizations in the old one you may leave it — they should be compatible):
    # [ -f /etc/my.cnf.rpmnew ] && mv /etc/my.cnf.rpmnew /etc/my.cnf
  8. Start MariaDB server:
    # service mysql start
  9. If you’re doing drop-in replacement, update table structure (mandatory if server version increased!):
    # mysql_upgrade -uadmin -p`< /etc/psa/.psa.shadow `
  10. Enable WatchDog and any other service disabled on step 3.
  11. If you experience MySQL errors (especially related to InnoDB), restore backup made on step 1:
    # zcat /root/mysql.all.dump.sql.gz | mysql -uadmin -p`< /etc/psa/.psa.shadow `

That’s it! To summarize: in case of clean (and I mean really clean, when there is no trace of MySQL installed) installation, it is sufficient to execute following command:

# yum install MariaDB-server MariaDB-client MariaDB-compat

In all other cases this instruction should be followed.

Installing Using Apt (Debian & Ubuntu)

  1. Perform backup and stop WatchDog if you have one enabled. See Installing Using Yum (CentOS & RedHat) for details.
  2. Enable MariaDB repository according to Repositories Setup. Synchronize package index files from new sources via:
    # apt-get update
  3. Depending on your OS and selected MariaDB version, execute one of the following commands.If you are on Debian 7 or Ubuntu 12.04 (then the only possible MariaDB version is 5.5), run:
    # env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 \
      install mariadb-server mysql-common libmariadbclient18

    If you are on Debian 6 or Ubuntu 10.04 and configured repositories for MariaDB 5.5, run:

    # env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 \
      install mariadb-server mysql-common

    If you are on Debian 6 or Ubuntu 10.04 and configured repositories for MariaDB 5.2 or 5.3, run:

    # env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 \
      install mariadb-server mysql-common libmariadbclient16

    Below you will find a sample transcript of installation recorded on Debian 6 for upgrading from mysql-server 5.1 to MariaDB 5.2:

    # env DEBIAN_FRONTEND=noninteractive apt-get -o OrderList::Score::Immediate=1000 \
      install mariadb-server mysql-common libmariadbclient16
    
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
      libevent-1.4-2 libmysqlclient16 mariadb-client-5.2 mariadb-client-core-5.2 mariadb-server-5.2
      mariadb-server-core-5.2
    Suggested packages:
      tinyca mariadb-test
    Recommended packages:
      libhtml-template-perl
    The following packages will be REMOVED:
      mysql-client-5.1 mysql-server mysql-server-5.1 mysql-server-core-5.1
    The following NEW packages will be installed:
      libevent-1.4-2 libmariadbclient16 mariadb-client-5.2 mariadb-client-core-5.2 mariadb-server
      mariadb-server-5.2 mariadb-server-core-5.2
    The following packages will be upgraded:
      libmysqlclient16 mysql-common
    2 upgraded, 7 newly installed, 4 to remove and 0 not upgraded.
    Need to get 20.5 MB of archives.
    After this operation, 6,025 kB disk space will be freed.
    Do you want to continue [Y/n]? y
    Get:1 http://mirror.plesk.ru/debian/ squeeze/main libevent-1.4-2 i386 1.4.13-stable-1 [56.6 kB]
    Get:2 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main mysql-common all 5.2.14-mariadb122~squeeze [10.6 kB]
    Get:3 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main libmysqlclient16 i386 5.2.14-mariadb122~squeeze [4,308 B]
    Get:4 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main libmariadbclient16 i386 5.2.14-mariadb122~squeeze [1,433 kB]
    Get:5 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main mariadb-client-5.2 i386 5.2.14-mariadb122~squeeze [1,725 kB]
    Get:6 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main mariadb-server-core-5.2 i386 5.2.14-mariadb122~squeeze [4,005 kB]
    Get:7 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main mariadb-server-5.2 i386 5.2.14-mariadb122~squeeze [13.2 MB]
    Get:8 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main mariadb-client-core-5.2 i386 5.2.14-mariadb122~squeeze [84.2 kB]
    Get:9 http://mirror.timeweb.ru/mariadb/repo/5.2/debian/ squeeze/main mariadb-server all 5.2.14-mariadb122~squeeze [4,338 B]
    Fetched 20.5 MB in 17s (1,142 kB/s)
    Preconfiguring packages ...
    (Reading database ... 78263 files and directories currently installed.)
    Preparing to replace mysql-common 5.1.66-0+squeeze1 (using .../mysql-common_5.2.14-mariadb122~squeeze_all.deb) ...
    Unpacking replacement mysql-common ...
    Preparing to replace libmysqlclient16 5.1.66-0+squeeze1 (using .../libmysqlclient16_5.2.14-mariadb122~squeeze_i386.deb) ...
    Unpacking replacement libmysqlclient16 ...
    Selecting previously deselected package libmariadbclient16.
    Unpacking libmariadbclient16 (from .../libmariadbclient16_5.2.14-mariadb122~squeeze_i386.deb) ...
    (Reading database ... 78262 files and directories currently installed.)
    Removing mysql-server ...
    dpkg: mysql-client-5.1: dependency problems, but removing anyway as you requested:
     mysql-server-5.1 depends on mysql-client-5.1 (>= 5.1.66-0+squeeze1).
    Removing mysql-client-5.1 ...
    Processing triggers for man-db ...
    Selecting previously deselected package mariadb-client-core-5.2.
    (Reading database ... 78197 files and directories currently installed.)
    Unpacking mariadb-client-core-5.2 (from .../mariadb-client-core-5.2_5.2.14-mariadb122~squeeze_i386.deb) ...
    Selecting previously deselected package mariadb-client-5.2.
    Unpacking mariadb-client-5.2 (from .../mariadb-client-5.2_5.2.14-mariadb122~squeeze_i386.deb) ...
    Selecting previously deselected package libevent-1.4-2.
    Unpacking libevent-1.4-2 (from .../libevent-1.4-2_1.4.13-stable-1_i386.deb) ...
    Processing triggers for man-db ...
    dpkg: mysql-server-core-5.1: dependency problems, but removing anyway as you requested:
     mysql-server-5.1 depends on mysql-server-core-5.1 (= 5.1.66-0+squeeze1); however:
      Package mysql-server-core-5.1 is to be removed.
    (Reading database ... 78252 files and directories currently installed.)
    Removing mysql-server-core-5.1 ...
    Processing triggers for man-db ...
    Selecting previously deselected package mariadb-server-core-5.2.
    (Reading database ... 78173 files and directories currently installed.)
    Unpacking mariadb-server-core-5.2 (from .../mariadb-server-core-5.2_5.2.14-mariadb122~squeeze_i386.deb) ...
    Processing triggers for man-db ...
    dpkg: mysql-server-5.1: dependency problems, but removing anyway as you requested:
     psa-horde depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-imp depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-atmail depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     pp11.5.30-bootstrapper depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-phpmyadmin depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-mnemo depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     pp11.0.9-bootstrapper depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-firewall depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-turba depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     plesk-core depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-watchdog depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
     psa-kronolith depends on mysql-server; however:
      Package mysql-server is not installed.
      Package mysql-server-5.1 which provides mysql-server is to be removed.
    (Reading database ... 78250 files and directories currently installed.)
    Removing mysql-server-5.1 ...
    Stopping MySQL database server: mysqld.
    Processing triggers for man-db ...
    Setting up mysql-common (5.2.14-mariadb122~squeeze) ...
    
    Configuration file `/etc/mysql/my.cnf'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : start a shell to examine the situation
     The default action is to keep your current version.
    *** my.cnf (Y/I/N/O/D/Z) [default=N] ? y
    Installing new version of config file /etc/mysql/my.cnf ...
    Selecting previously deselected package mariadb-server-5.2.
    (Reading database ... 78173 files and directories currently installed.)
    Unpacking mariadb-server-5.2 (from .../mariadb-server-5.2_5.2.14-mariadb122~squeeze_i386.deb) ...
    Processing triggers for man-db ...
    Setting up libevent-1.4-2 (1.4.13-stable-1) ...
    Setting up libmysqlclient16 (5.2.14-mariadb122~squeeze) ...
    Setting up libmariadbclient16 (5.2.14-mariadb122~squeeze) ...
    Setting up mariadb-client-core-5.2 (5.2.14-mariadb122~squeeze) ...
    Setting up mariadb-client-5.2 (5.2.14-mariadb122~squeeze) ...
    Setting up mariadb-server-core-5.2 (5.2.14-mariadb122~squeeze) ...
    Setting up mariadb-server-5.2 (5.2.14-mariadb122~squeeze) ...
    Installing new version of config file /etc/init.d/mysql ...
    Installing new version of config file /etc/mysql/debian-start ...
    Stopping MariaDB database server: mysqld.
    Starting MariaDB database server: mysqld.
    Checking for corrupt, not cleanly closed and upgrade needing tables..
    Selecting previously deselected package mariadb-server.
    (Reading database ... 78295 files and directories currently installed.)
    Unpacking mariadb-server (from .../mariadb-server_5.2.14-mariadb122~squeeze_all.deb) ...
    Setting up mariadb-server (5.2.14-mariadb122~squeeze) ...
    #

    Please note that during installation you have an option to either retain old my.cnf or install the one packaged with MariaDB.

  4. By now MariaDB daemon is already running and automatic table structure upgrade was performed if required. If you have previously disabled WatchDog it’s now time to enable it.
  5. If you experience MySQL errors (especially related to InnoDB), restore previously created backup as described in Installing Using Yum (CentOS & RedHat).

If your machine doesn’t have any part of MySQL installed, you may greatly simplify this procedure and instead call a simple command:

# apt-get install mariadb-server

If during installation you are asked to enter new MariaDB password, don’t specify it (just hit <Enter>). Otherwise Plesk will not be able to guess your password and access DB server (in other words installation will fail).

Interesting observation: if on Debian 6 or Ubuntu 10.04 and MariaDB 5.5 is installed, then libmysqlclient16 will still be provided by OS vendor. But it works quite OK with MariaDB.

Installing Using Zypper (SuSE)

This is pretty straightforward and not very demanding, given that packages are in OS vendor repo. There’s official guide to Switching between MySQL variants.

Switching to MariaDB is really easy:

  1. Perform backup and stop WatchDog if you have one enabled. See Installing Using Yum (CentOS & RedHat) for details.
  2. Stop MySQL server:
    # service mysql stop
  3. Install MariaDB:
    # zypper install mariadb

    Below you will find full sample transcript for your reference (executed on SuSE 12.2 x64):

    # zypper install mariadb
    Loading repository data...
    Reading installed packages...
    Resolving package dependencies...
    
    Problem: mysql-community-server-5.5.28-1.4.1.x86_64 conflicts with namespace:otherproviders(mysql) provided by mariadb-5.5.28a-1.4.1.x86_64
     Solution 1: deinstallation of mysql-community-server-5.5.28-1.4.1.x86_64
     Solution 2: do not install mariadb-5.5.28a-1.4.1.x86_64
    
    Choose from above solutions by number or cancel [1/2/c] (c): 1
    Resolving dependencies...
    Resolving package dependencies...
    
    Problem: mariadb-5.5.28a-1.4.1.x86_64 requires mariadb-errormessages = 5.5.28a, but this requirement cannot be provided
      uninstallable providers: mariadb-errormessages-5.5.28a-1.4.1.i586[updates]
                       mariadb-errormessages-5.5.28a-1.4.1.x86_64[updates]
     Solution 1: deinstallation of mysql-community-server-client-5.5.28-1.4.1.x86_64
     Solution 2: do not install mariadb-5.5.28a-1.4.1.x86_64
     Solution 3: do not install mariadb-5.5.28a-1.4.1.x86_64
     Solution 4: break mariadb-5.5.28a-1.4.1.x86_64 by ignoring some of its dependencies
    
    Choose from above solutions by number or cancel [1/2/3/4/c] (c): 1
    Resolving dependencies...
    Resolving package dependencies...
    
    The following NEW packages are going to be installed:
      mariadb mariadb-client mariadb-errormessages
    
    The following packages are going to be REMOVED:
      mysql-community-server mysql-community-server-client
    
    3 new packages to install, 2 to remove.
    Overall download size: 6.5 MiB. After the operation, additional 20.4 MiB will be used.
    Continue? [y/n/?] (y): y
    Retrieving package mariadb-errormessages-5.5.28a-1.4.1.x86_64
                                                                 (1/3), 194.5 KiB (  1.6 MiB unpacked)
    Retrieving: mariadb-errormessages-5.5.28a-1.4.1.x86_64.rpm .................................[done]
    Retrieving package mariadb-client-5.5.28a-1.4.1.x86_64       (2/3), 870.9 KiB ( 17.6 MiB unpacked)
    Retrieving: mariadb-client-5.5.28a-1.4.1.x86_64.rpm ........................................[done]
    Retrieving package mariadb-5.5.28a-1.4.1.x86_64              (3/3),   5.5 MiB ( 59.4 MiB unpacked)
    Retrieving: mariadb-5.5.28a-1.4.1.x86_64.rpm ...............................................[done]
    Removing mysql-community-server-5.5.28-1.4.1 ...............................................[done]
    Additional rpm output:
    redirecting to systemctl
    warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
    insserv: warning: script 'S01nginx' missing LSB tags and overrides
    insserv: warning: script 'S01sw-cp-server' missing LSB tags and overrides
    insserv: warning: script 'sw-cp-server' missing LSB tags and overrides
    insserv: warning: script 'nginx' missing LSB tags and overrides
    insserv: warning: current start runlevel(s) (6) of script `vzreboot' overwrites defaults (empty).
    
    Removing mysql-community-server-client-5.5.28-1.4.1 ........................................[done]
    Installing: mariadb-errormessages-5.5.28a-1.4.1 ............................................[done]
    Installing: mariadb-client-5.5.28a-1.4.1 ...................................................[done]
    Installing: mariadb-5.5.28a-1.4.1 ..........................................................[done]
    Additional rpm output:
    install-info: warning: no info dir entry in `/usr/share/info/mysql.info.gz'
    
    #
  4. Start MariaDB server:
    # systemctl --system daemon-reload
    # service mysql start
  5. Enable WatchDog if you need to.

You can switch back to mysql-community-server the same way. Note that while switching between MySQL variants /etc/my.cnf configuration file may be overwritten. Usually old version is saved to /etc/my.cnf.rpmsave.

Clean Installation of Plesk with MariaDB

Here and below AI means Parallels Installer or Autoinstaller.

  1. Install MariaDB using steps described in Installing MariaDB.
  2. Install Plesk 11.5.30 or later as you would normally. Make sure system MySQL server (mysql-sys AI component, “MySQL server support”) is selected if there is an option to install one packaged by Parallels:
      Different MySQL server versions
    13. (=) MySQL server support
    14. ( ) MySQL v5.5 (packaged by Parallels)
  3. Enjoy!

Installing MariaDB as a drop-in replacement for MySQL

If you have a Plesk with MySQL and want to replace it with MariaDB, follow these steps.

  1. Upgrade to Plesk 11.5.30 or later via AI.
  2. Replace MySQL with MariaDB using steps described in Installing MariaDB.
  3. Enjoy!

If you want to install MariaDB on any previous Plesk version, you can still do that, but there are 2 caveats:

  1. You will need to somehow disable automatic package updates to Plesk via AI. Otherwise AI will attempt to install OS vendor version of MySQL, which will either fail or wreck your installation.
  2. You may encounter package dependency problems during replacing MySQL compared to the guide in Installing MariaDB.

Here’s one trick that will disable any automatic updates via AI. Place following strings in /root/.autoinstallerrc:

# Disable AI to avoid package updates, so MariaDB doesn't get broken.
PROXY_HOST = ai-is-manually-disabled
PROXY_PORT = 1

This will make AI fail on any operation. This will obviously disable installation of patches and update notifications as well. We do not recommend doing this! Remember that keeping your Plesk installation up-to-date is essential to keep your server secure!

Provided you succeed, such installation may later be safely upgraded to latest Plesk version. See below.

Upgrading Plesk with MariaDB

Upgrading Plesk to 11.5.30 or later with MariaDB is quite simple and doesn’t require additional steps. Just perform your normal upgrade procedure via AI.

Upgrading to versions less than 11.5 with MySQL drop-in replacements will fail, so don’t attempt it unless you know how to do it safely.

5 Comments

  1. Thanks so much for this nice tutorial. I normally use Gnome’s software update gui for updates, and I noticed that maradb show as an upgrade. Does not YUM take care of removing and installing mariadb by itself? will I have any later problems if I simply run the upgrade from the gui? I have mysql 5.5 and I want to switch to mariadb 5.5

    Your help is greatly appreciated

    Miguel

  2. Nice tutorial, could you make another tutorial for plesk users who have done this upgrade to MariaDB v5.5 but would like to change to version MariaDB v10 ?

  3. Please Update This Guide For New Version!

  4. Can I have both maria and mysql runnint same server

  5. this guide explains that how can we replace MySQL server on a Plesk installation with MariaDB server in detail. Good post.

Add a Comment

Your email address will not be published. Required fields are marked *

GET LATEST NEWS AND TIPS

  • Yes, please, I agree to receiving my personal Plesk Newsletter! WebPros International GmbH and other WebPros group companies may store and process the data I provide for the purpose of delivering the newsletter according to the WebPros Privacy Policy. In order to tailor its offerings to me, Plesk may further use additional information like usage and behavior data (Profiling). I can unsubscribe from the newsletter at any time by sending an email to [email protected] or use the unsubscribe link in any of the newsletters.

  • Hidden
  • Hidden
  • Hidden
  • Hidden
  • Hidden
  • Hidden

Related Posts

Knowledge Base