Percona Server is an enhanced drop-in replacement for MySQL. If you are a web hosting service provider, and are facing frequent MySQL related issues, you might find Percona to be a good replacement. Shared hosting environment, where the resource requirements are limited, the common issue with SQL server is the server management aspect and resource constraints. How to replace MySQL with Percona in cPanel server? Before do that will check with percona performance.

Percona uses a technology called “adaptive flushing” which do not induce a performance bottleneck. When combined with another piece of technology called “Flashcache”, where disk I/O is made faster, Percona avoids memory or I/O bottlenecks even during a sudden surge in traffic.

percona for MySQL


  • Handle traffic spikes better than MySQL
  • Faster transactions than MySQL which improves responsiveness
  • High uptime through Percona XtraDB Clusters (PXC)
  • Better scalability through multi-CPU support and clustering

Steps to replace MySQL with Percona in cPanel server

Important: Backup all existing MySQL data.(Make sure there is no corrupted databases and stop mysql service then backup data)

# cp -Rf /var/lib/mysql /var/lib/mysql-old
# mv /etc/my.cnf /etc/my.cnf-old

Disable the MySQL targets to prevent from the cPanel/WHM 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

Uninstall the existing MySQL RPMs

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

Create a yum repository for MariaDB

# vi /etc/yum.repos.d/percona.repo

Add below entries

name = CentOS $releasever - Percona
enabled = 1
gpgkey =
gpgcheck = 1

Remove php from “exclude” list in /etc/yum.conf

Install PerconaDB packages

# yum install Percona-Server-client-55 Percona-Server-server-55 Percona-Server-devel-55

Start MySQL services

# /etc/init.d/mysql start

run mysql_upgrade

# mysql_upgrade

Restart MySQL

# /etc/init.d/mysql restart

Add php back in “exclude” list /etc/yum.conf to ensure future php updates don’t get clobbered.

Rebuild easyapache/php to ensure modules are working again.

# /scripts/easyapache --build


If you will get the following errors on easyapache or php -v command, replace the symlink

php: error while loading shared libraries: cannot open shared object file: No such file or directory configure: error: Cannot find libmysqlclient under /usr.


# ln -s /usr/lib64/ /usr/lib64/
# ln -s /usr/lib64/ /usr/lib64/

Run EasyApache again.


Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

0.00 avg. rating (0% score) - 0 votes