Installing Percona Server for MySQL on Red Hat Enterprise Linux and CentOS¶
Ready-to-use packages are available from the Percona Server for MySQL software repositories and the download page. The Percona yum repository supports popular RPM-based operating systems, including the Amazon Linux AMI.
The easiest way to install the Percona Yum repository is to install an RPM that configures yum and installs the Percona GPG key.
Specific information on the supported platforms, products, and versions are described in Percona Software and Platform Lifecycle.
What’s in each RPM package?¶
Each of the Percona Server for MySQL RPM packages have a particular purpose.
|percona-server-server||Server itself (the
|percona-server-debuginfo||Debug symbols for the server|
|percona-server-client||Command line client|
|percona-server-devel||Header files needed to compile software using the client library.|
|percona-server-shared||Client shared library.|
|percona-server-shared-compat||Shared libraries for software compiled against old versions of
the client library. The following libraries are included in
|percona-server-test||Includes the test suite for Percona Server for MySQL.|
Installing Percona Server for MySQL from Percona
You can install Percona yum repository by running the following commands as a
root user or with sudo.
Install the Percona repository
$ sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
You should see an output that the files are being downloaded, like the following:
percona-release-latest.noarch-rpm 36 kB/s | 19 kb 00:00 ===================================================================== Package Architecture Version Repository Size ===================================================================== Installing: percona release noarch 1.0-25 @commandline 19k ...
Enable the repository:
$ sudo percona-release setup ps80 On RedHat 8 systems it is needed to disable dnf mysql module to install Percona-Server Do you want to disable it? [y/N] y ...
Install the packages
$ sudo yum install percona-server-server
Percona Server for MySQL 8.0 also provides the TokuDB storage engine and MyRocks storage engines which can be installed as plugins. For more information on how to install and enable the TokuDB storage review the TokuDB Installation document. For information on how to install and enable MyRocks review the section Percona MyRocks Installation Guide.
Percona yum Testing repository¶
Percona offers pre-release builds from our testing repository. To
subscribe to the testing repository, you’ll need to enable the testing
/etc/yum.repos.d/percona-release.repo. To do so,
enabled = 1 (Note that there are three sections in this file:
release, testing and experimental - in this case it is the second
section that requires updating). NOTE: You’ll need to install the
Percona repository first (ref above) if this hasn’t been done already.
Installing Percona Server for MySQL using downloaded rpm packages¶
Download the packages of the desired series for your architecture from the download page. The easiest way is to download bundle which contains all the packages. Following example will download Percona Server for MySQL 8.0.21-12 release packages for CentOS 8:
$ wget https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.21-12/binary/redhat/8/x86_64/Percona-Server-8.0.21-12-r7ddfdfe-el8-x86_64-bundle.tar
Unpack the bundle to get the packages:
tar xvf Percona-Server-8.0.21-12-r7ddfdfe-el8-x86_64-bundle.tar
To view a list of packages, run the following command:
$ ls *.rpm percona-mysql-router-8.0.21-12.2.el8.x86_64.rpm percona-mysql-router-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona-server-client-8.0.21-12.2.el8.x86_64.rpm percona-server-client-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona-server-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona-server-debugsource-8.0.21-12.2.el8.x86_64.rpm percona-server-devel-8.0.21-12.2.el8.x86_64.rpm percona-server-rocksdb-8.0.21-12.2.el8.x86_64.rpm percona-server-rocksdb-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona-server-server-8.0.21-12.2.el8.x86_64.rpm percona-server-server-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona- server-shared-8.0.21-12.2.el8.x86_64.rpm percona-server-shared-compat-8.0.21-12.2.el8.x86_64.rpm percona-server-shared-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona-server-test-8.0.21-12.2.el8.x86_64.rpm percona-server-test-debuginfo-8.0.21-12.2.el8.x86_64.rpm percona-server-tokudb-8.0.21-12.2.el8.x86_64.rpm
jemallocwith the following command, if needed:
For a RHEL/CentOS 8 package installation, Percona Server for MySQL requires the mysql module to be disabled before installing the packages:
sudo yum module disable mysql
Install all the packages (for debugging, testing, etc.) with the following command:
$ sudo rpm -ivh *.rpm
When installing packages manually, you must make sure to resolve all dependencies and install any missing packages yourself.
Running Percona Server for MySQL¶
Percona Server for MySQL stores the data files in
default. The configuration file used to manage Percona Server for MySQL is the
The following commands start, provide the server status, stop the server, and restart the server:
Percona Server for MySQL is not started automatically on RHEL and CentOS after installation. Start the server with the following command:
$ sudo service mysql start
Review the service status with the following command:
$ sudo service mysql status
Stop the service with the following command:
$ sudo service mysql stop
Restart the service with the following command:
$ sudo service mysql restart
RHEL 7 and CentOS 7 come with systemd as the default
system and service manager so you can invoke all the above commands
sytemctl instead of
service. Currently, both are
Uninstalling Percona Server for MySQL¶
To completely uninstall Percona Server for MySQL, remove all the installed packages and data files.
Stop the Percona Server for MySQL service:
$ sudo service mysql stop
Remove the packages:
$ sudo yum remove percona-server*
Remove the data and configuration files:
This step removes all the packages and deletes all the data files (databases, tables, logs, etc.). Take a backup before doing this in case you need the data.
$ rm -rf /var/lib/mysql $ rm -f /etc/my.cnf