How to install MariaDB in cPanel CloudLinux based server

MariaDB is an enhanced drop-in replacement for MySQL. Latest stable version of MariaDB is 10.0. First of all, we need to take the backup of all the databases in the server and then we can safely proceed with the MariaDB installation.

Features of MariaDB
>> Data and table definition files (.frm) are binary compatible.
>> All client APIs, protocols and struct are identical.
>> All filenames, binaries, paths, ports, sockets etc should be the same.
>> All MySQL connectors (PHP, Perl, Python, Java, .NET, MyODBC, Ruby, MySQL C connector) works unchanged with MariaDB.
>> mysql-client package also works with MariaDB server.
>> The shared client-library is binary compatible with MySQL’s client library.

1. To take the backup of all the databases in the server refer to the section How to create MySQL dump/backup of all the databases

For a normal cPanel server, please follow this How to replace MySQL with MariaDB on a cPanel server

Now we can proceed with the MariaDB installation in the server. Next step is to select MySQL version as MariaDB.

2. Select MySQL version as MariaDB

# /usr/share/lve/dbgovernor/db-select-mysql --mysql-version=mariadb100

MariaDB versions:

mariadb55 for MariaDB v5.5
mariadb100 for MariaDB v10.0
mariadb101 for MariaDB v10.1

3. Install MariaDB

# /usr/share/lve/dbgovernor/db-select-mysql --install-now

Final step is to recompile PHP and Apache in the server.

# /scripts/easyapache

Done!!!

Also read

1, Introduction to CageFS and PHP Selector and installation – CloudLinux
2, Introduction to CloudLinux and installation guide
3, Impossible to create database’s user::MySQL governor
4, Upgrade MySQL and MySQL Governor in cPanel CloudLinux based server via command line

Post navigation

Heba Habeeb

Working as a Linux Server Admin, Infopark, Cochin, Kerala.

Leave a Reply

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