Installing Percona Server and the debugging tools in CentOS7/RHEL6.x

Installing Percona Server using downloaded rpm packages
  1. Download there required packages for your machine architecture from the source page. The easiest way is to download bundle which contains all the packages. Following example will download Percona Server 5.5.44-37.3 release packages for CentOS 6:
  1. wget https://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.44-37.3/binary/redhat/6/x86_64/Percona-Server-5.5.44-37.3-r729fbe2-el6-x86_64-bundle.tar
  1. untar the bundle :
  1. tar xvf Percona-Server-5.5.44-37.3-r729fbe2-el6-x86_64-bundle.tar

After you untar the bundle you can confirm that the following packages are present:

$ ls *.rpm
Percona-Server-55-debuginfo-5.5.44-rel37.3.el6.x86_64.rpm
Percona-Server-client-55-5.5.44-rel37.3.el6.x86_64.rpm
Percona-Server-devel-55-5.5.44-rel37.3.el6.x86_64.rpm
Percona-Server-server-55-5.5.44-rel37.3.el6.x86_64.rpm
Percona-Server-shared-55-5.5.44-rel37.3.el6.x86_64.rpm
Percona-Server-test-55-5.5.44-rel37.3.el6.x86_64.rpm
  1. Now you can install Percona Server by running:
    rpm -ivh Percona-Server-server-55-5.5.44-rel37.3.el6.x86_64.rpm Percona-Server-client-55-5.5.44-rel37.3.el6.x86_64.rpm Percona-Server-shared-55-5.5.44-rel37.3.el6.x86_64.rpm

Then install the main Percona Server and all other packages required for debugging , testing, etc.) you should run:

rpm -ivh *.rpm

NB

During a manual compilation like this one , you need to resolve all the dependencies and missing packages yourself as it is not retrieved from a repository.

Running Percona Server

The default directory where Percona Server  stores data files is the /var/lib/mysql/. The main configuration file that will affect and handle the operation of the Percona Server  is the /etc/my.cnf. file

  1. Starting the service

Percona Server isn’t started automatically on RHEL and CentOS after it gets installed. You should start it by running:

service mysql start
  1. Confirming that service is running

You can check the service status by running:

service mysql status
  1. Stopping the service

You can stop the service by running:

service mysql stop
  1. Restarting the service

You can restart the service by running:

service mysql restart

Note

RHEL 7 and CentOS 7 come with systemd as the default system and service manager so you can invoke all the above commands with sytemctl instead of service. Currently both are supported.

Uninstalling Percona Server

To completely uninstall Percona Server you’ll need to remove all the installed packages and data files.

  1. Stop the Percona Server service
    service mysql stop
  1. Remove the packages
    yum remove Percona-Server*
  1. Remove the data and configuration files
    rm -rf /var/lib/mysql
    rm -f /etc/my.cnf

Warning*

This will remove all the packages and delete all the data files (databases, tables, logs, etc.), you might want to take a backup before doing this in case you need the data.

%d bloggers like this: