Home General TopicsMariaDB: An Alternate for Mysql

MariaDB: An Alternate for Mysql

by Bella

MariaDB is a high performance drop-in replacement for MySQL, developed by some of the original authors of the MySQL project. For years, MySQL has been the dominant open-source database management system (DBMS). Recently, MariaDB, the MySQL fork created by MySQL’s founder, has been making in-roads and websites like Wikipedia the world’s sixth most popular Web site, is shifting over from MySQL to MariaDB.

Lets check how to replace MYSQL with MARIADB in a cpanel server

Step 1: Backup existing MySQL data

Before installing mariadb make sure to take backup of current mysql data

# service mysql stop
# cp -r /var/lib/mysql /var/lib/mysql-back
# service mysql start

Step 2: Disable the targets so cPanel no longer handles MySQL updates

#/scripts/update_local_rpm_versions –edit target_settings.MySQL50 uninstalled
#/scripts/update_local_rpm_versions –edit target_settings.MySQL51 uninstalled
#/scripts/update_local_rpm_versions –edit target_settings.MySQL55 uninstalled

Step 3: Remove existing MySQL RPM’s so theres a clean slate for MariaDB

#/scripts/check_cpanel_rpms –fix –targets=MySQL50,MySQL51,MySQL55

Step 4: Create a yum repository for MariaDB

Access https://downloads.mariadb.org/mariadb/repositories and select the DISTRO and place the repo content to /etc/yum.repos.d/MariaDB.repo.
#nano /etc/yum.repos.d/MariaDB.repo

====================================================
# MariaDB 5.5 CentOS repository list – created 2014-09-16 13:35 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
===================================================

Step 5: Install MariaDB using the following command

# yum install MariaDB-server MariaDB-client MariaDB-devel

note: If you are encountering in any dependency problem, please remove PHP from the /etc/yum.conf file and then run above yum command again

# /etc/init.d/mysql start
# mysql_upgrade
# /etc/init.d/mysql restart

ADD the php back to the yum conf file.

Step 6: Rebuild easyapache/php to ensure modules are working.

#/scripts/easyapache –build

Need expert assistance?

SupportPRO has a team of well experienced professionals. We can assist you in shifting over from MySQL to MariaDB in your server. Feel free to contact us if you need assistance.

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

You may also like

Leave a Comment