Percona Server is based on the original MySQL code, but functions as a drop-in that replaces MySQL .Like MySQL, Percona Server is open-source, so it is free and it benefits from additions from the community. Percona Inc. takes these and other improvements and makes them available as a package to the general public.
Moving from MySQL to Percona Server is relatively straightforward.But this setup is considered to be unsupported by the cPanel/WHM team.So you may need to manage and maintain any updates and maintenance on the database software by your self.
You can do it by following the steps provided here:
Please make full database backup(including system tables) before switching to Percona. This action will prevent data losing in case if something goes wrong.This is the most time consuming section of this process.
# 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
Move your existing mysql configuration file ( /etc/my.cnf ).Your original MySQL my.cnf file should work fine for Percona but to reduce risk factor,I suggest you to move your existing mysql configuration file:
# mv /etc/my.cnf /etc/my.cnf.old
Disable the targets so cPanel no longer handles MySQL updates:
The following will mark the versions of MySQL 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
Remove existing MySQL RPMs so there’s a clean slate for Percona.
# /scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55
Create a yum repository for Percona:
[percona] name = CentOS $releasever - Percona baseurl=http://repo.percona.com/centos/$releasever/os/$basearch/ enabled = 1 gpgkey = http://www.percona.com/redir/downloads/percona-release/RPM-GPG-KEY-percona gpgcheck = 1
Remove php from the exclude section of /etc/yum.conf file then run the following commands to install Percona Server.
# yum install Percona-Server-client-55 Percona-Server-server-55 Percona-Server-devel-55 # /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.
Compile PHP with newly installed MySQL libraries using :
# /scripts/easyapache --build
Make sure every websites work fine with new Percona Server.