CentrioHost Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


How to install Percona Server in cPanel/WHM servers

What is Percona Server ?

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.

What are the advantages of using Percona Server ?
  •  Percona Server will be faster and more consistent for your database queries.
  • Percona Server is backward-compatible with MySQL, So your developers donâ$™t need to change code or rewrite queries.
  • Percona Server takes advantage of the advances in multi-core CPUs, multithreading and solid-state drives.
  • Percona Server contains optimized algorithms for background processing, and enhancements to buffers and caches.
  • Percona Server need only less time in tuning and administering.
  • Percona Server can be easily troubleshoot without guesswork.There are more status counters available for monitoring than in MySQL, So you can get a clear picture of what is happening with your database server.
  • Percona Server will save money on hardware upgrades.
How can you replace MySQL with Percona Server in cPanel installed systems ?

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:

Step 1:

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
Step 2:

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
Step 3:

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
Step 4:

Remove existing MySQL RPMs so there’s a clean slate for Percona.

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

Create a yum repository for Percona:

nano /etc/yum.repos.d/percona.repo

[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
Step 6:

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.

Step 7:

Compile PHP with newly installed MySQL libraries using :

# /scripts/easyapache --build

Make sure every websites work fine with new Percona Server.

References:

http://blog.cpanel.net
http://www.percona.com/software/percona-server

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

SatSunMonTueWedThuFri
 123456
78910111213
14151617181920
21222324252627
282930 

Over 20000 Satisfied Customers!

  • web hosting reviewer
    Valerie Quinn
    CTO, Acteon Group

    Centriohost staff were fantastic, I had a concern with a domain and they got back to me very quickly and they helped me to resolve the issue! ~ . . . Read more

  • Joomla hosting reviewer
    Collin Bryan
    Photographer, Allister Freeman

    I'm using centrio for my portfolio since 2006. The transition was seamless, the support was immediate, and everything works perfectly. ~ . . . Read more

  • dedicated server reviewer
    Harry Collett
    Actor, A&J Artists

    Very easy to understand & use even though I am not very technologically minded. No complications whatsoever & I wouldn't hesitate to recommend it to all. ~ . . . Read more

  • vps web hosting reviewer
    Porfirio Santos
    Technician, Diageo PLC

    Centrio support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Centriohost have been amazingly responsive and helpful to any of my queries 👍👍👍 ~ . . . Read more

  • wordpress hosting plans reviewer
    Catherine Auer
    Doctor, SmartClinics

    Anytime I've had a problem I can't solve, I've found Centriohost to be diligent and persistent. They simply won't let an issue go until the client is happy. ~ . . . Read more

  • reseller hosting reviewer
    Effectivo Social
    Freelancer, Fiverr

    Recommend their shared hosting for all my SME web design clients. Their cloud or VME offerings are too great to deal with. Pricing is perfect and suitable for all users (͠≖ ͜ʖ͠≖) 👌 ~ . . . Read more

Top