1. How to replace MySQL with
MariaDB in cpanel
cpanel, Installation
Author: http:www.24x7serversupport.com
Also Read more on our blog:
http://www.24x7serversupport.com/24x7serversupport-blog/2014/10/
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/
2. Backup existing MySQL data
• Make sure to save all existing data just in case
there are any issues.
• cp -Rf /var/lib/mysql /var/lib/mysql-old
mv /etc/my.cnf /etc/my.cnf-old
www.24x7serversupport.com/24x7serversupport-blog/2014/10/
3. Disable the targets so cPanel no
longer handles MySQL updates
• 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
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/
4. Remove existing MySQL RPM’s so
theres a clean slate for MariaDB
• The below command will uninstall the
MySQL RPM’s!
• /scripts/check_cpanel_rpms –fix –
targets=MySQL50,MySQL51,MySQL55
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/
5. Create a your repository for MariaDB
• vi /etc/yum.repos.d/MariaDB.repo
• place the following inside of it depending on the
DISTRO
(https://downloads.mariadb.org/mariadb/repositories/
):
• [mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5.29/centos6-
amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-
MariaDB
gpgcheck=1
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/
6. Remove php from the /etc/yum.conf
file then run the following commands
• yum install MariaDB-server MariaDB-client
MariaDB-devel
/etc/init.d/mysql start
mysql_upgrade
/etc/init.d/mysql restart
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/
7. • Add php back to the /etc/yum.conf file to
ensure future php updates don’t get
clobbered
• Rebuild easyapache/php to ensure modules
are intact/working
• /scripts/easyapache –build
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/
8. Author: www.24x7serversupport.com
Also Read more on our blog:
www.24x7serversupport.com/24x7serversupport-blog/2014/10/
Thank you !!!
www.24x7serversupport.com/24x7serversu
pport-blog/2014/10/