MariaDB is a binary drop in replacement of the same MySQL version (for example MySQL 5.1 -> MariaDB 5.1, MariaDB 5.2 & MariaDB 5.3 are compatible. MySQL 5.5 will be compatible with MariaDB 5.5). What this means is that:
This means that for most cases, you can just uninstall MySQL and install MariaDB and you are good to go. (No need to convert any datafiles if you use same main version, like 5.1). You must however still run mysql_upgrade to finish the upgrade. This is needed to ensure that your mysql privilege and event tables are updated with the new fields MariaDB uses. MariaDB do a monthly merges with the MySQL code base to ensure its compatibility and get any and all features and bug fixes Oracle adds.
There are some installation issues with PHP5 that you should be aware of ( REF:https://mariadb.com/kb/en/installation-issues-with-php5 )
Below you will find some steps on how to affectively stop cPanel/WHM from maintaining MySQL and begin utilizing MariaDB for any and all database activity on your server. MariaDB is “An enhanced, drop-in replacement for MySQL” (Source: https://mariadb.com) .
We recommend only experienced systems administrators perform the above and we are not responsible for any possible data loss.
Make sure to save all existing data just in case there are any issues.
# mysqldump --all-databases --routines --triggers > /home/db_dump/alldb.sql # service mysql stop # cp -r /var/lib/mysql/mysql /home/db_dump/ # service mysql start
The following will mark the versions of MySQL we distribute as uninstalled so they are no longer maintained by cPanel/WHM
# /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
Important: The below command will uninstall the MySQL RPMâ€™s!
# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55
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 2013-06-23 21:13 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= --------
# yum install MariaDB-server MariaDB-client MariaDB-devel
If you are having any dependency problem, please remove PHP from the /etc/yum.conf file and then run yum command again. Please add it back to yum conf once the package is installed.
# /etc/init.d/mysql start # mysql_upgrade # /etc/init.d/mysql restart
Please make sure to add PHP back to exclude section of /etc/yum.conf file.
# /scripts/easyapache --build