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. 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.
Percona Server for MySQL is certified for Red Hat Enterprise Linux 8. This certification is based on common and secure best practices and successful interoperability with the operating system. Percona Server is listed in the Red Hat Ecosystem Catalog.
The RPM packages for Red Hat Enterprise Linux 7 and the compatible derivatives do not support TLSv1.3, as it requires OpenSSL 1.1.1, which is currently not available on this platform.
What’s in each RPM package?¶
Each of the Percona Server for MySQL RPM packages has a particular purpose.
|percona-server-server||Server itself (the mysqld binary)|
|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 this package: libmysqlclient.so.12, libmysqlclient.so.14, libmysqlclient.so.15, libmysqlclient.so.16, and libmysqlclient.so.18.|
|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
The output could be like the following:
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.
Starting with Percona Server for MySQL 8.0.28-19 (2022-05-12), the TokuDB storage engine is no longer supported. We have removed the storage engine from the installation packages and disabled the storage engine in our binary builds. For more information, see TokuDB Introduction.
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 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).
You must install the Percona repository first if the installation has not 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 the bundle which contains all the packages. The following example downloads Percona Server for MySQL 8.0.21-12 release packages for RHEL 8.
$ wget https://downloads.percona.com/downloads/Percona-Server-LATEST/Percona-Server-8.0.29-21/binary/redhat/8/x86_64/Percona-Server-8.0.29-21-rc59f87d2854-el8-x86_64-bundle.tar
Unpack the bundle to get the packages:
tar xvf Percona-Server-8.0.29-21-rc59f87d2854-el8-x86_64-bundle.tar
To view a list of packages, run the following command:The output should look like the following:
$ ls *.rpm
percona-icu-data-files-8.0.29-21.1.el8.x86_64.rpm percona-mysql-router-8.0.29-21.1.el8.x86_64.rpm percona-mysql-router-debuginfo-8.0.29-21.1.el8.x86_64.rpm percona-server-client-8.0.29-21.1.el8.x86_64.rpm percona-server-client-debuginfo-8.0.29-21.1.el8.x86_64.rpm percona-server-debuginfo-8.0.29-21.1.el8.x86_64.rpm percona-server-debugsource-8.0.29-21.1.el8.x86_64.rpm percona-server-devel-8.0.29-21.1.el8.x86_64.rpm percona-server-rocksdb-8.0.29-21.1.el8.x86_64.rpm percona-server-rocksdb-debuginfo-8.0.29-21.1.el8.x86_64.rpm percona-server-server-8.0.29-21.1.el8.x86_64.rpm percona-server-server-debuginfo-8.0.29-21.1.el8.x86_64.rpm percona-server-shared-8.0.29-21.1.el8.x86_64.rpm percona-server-shared-compat-8.0.29-21.1.el8.x86_64.rpm percona-server-shared-debuginfo-8.0.29-21.1.el8.x86_64.rpm percona-server-test-8.0.29-21.1.el8.x86_64.rpm percona-server-test-debuginfo-8.0.29-21.1.el8.x86_64.rpm
jemallocwith the following command, if needed:
For an EL8-based RHEL distribution or derivatives package installation, the 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.
The RHEL distributions and derivatives come with systemd as the default system and service manager so you can invoke all of the commands with
sytemctl instead of
service. Currently, both options are supported.
Percona Server for MySQL is not started automatically on the RHEL distributions and derivatives 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
SELinux and security considerations¶
For information on working with SELinux, see Working with SELinux.
The RHEL 8 distributions and derivatives have added system-wide cryptographic policies component. This component allows the configuration of cryptographic subsystems.
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