Share on Social Media

Learn how to install Percona Server on CentOS 8 with this comprehensive guide. Follow our step-by-step instructions to set up and configure Percona Server on your Linux system quickly and efficiently. #centlinux #linux #mysql

What is Percona Server for MySQL?

Percona Server is an enhanced, open-source, and fully compatible drop-in replacement for MySQL. It is designed to provide superior performance, scalability, and reliability for demanding database applications. Percona Server is developed and maintained by Percona, a company renowned for its database expertise and commitment to open-source solutions. Key features of Percona Server include:

  1. Performance Enhancements: Includes various optimizations and improvements over standard MySQL, delivering better performance for high-traffic applications.
  2. Scalability: Supports large-scale deployments with features that enhance the handling of large databases and heavy loads, making it suitable for enterprise environments.
  3. Advanced Monitoring: Integrates seamlessly with Percona Monitoring and Management (PMM) tools, offering advanced analytics and insights into database performance.
  4. High Availability: Provides robust solutions for high availability and disaster recovery, including support for Percona XtraDB Cluster for clustering and replication.
  5. Enhanced Security: Offers additional security features and improvements, ensuring better protection for sensitive data and compliance with security standards.
  6. User and Developer-Friendly: Maintains full compatibility with MySQL, allowing users to migrate easily and developers to use familiar MySQL tools and applications.
  7. Extensive Support and Community: Backed by a strong community and Percona’s professional support services, offering users a wealth of resources and assistance.
  8. Open Source: Completely free and open-source, ensuring transparency, flexibility, and freedom from vendor lock-in.

Percona Server is widely used by organizations that require a reliable, high-performance database solution. It is an excellent choice for businesses looking to enhance their MySQL-based applications with better performance, scalability, and advanced features.

Recommended Online Training: Complete MySQL Database Administration Course

4323756 577f 2show?id=oLRJ54lcVEg&offerid=1074530.4323756&bids=1074530

MySQL vs Percona Server

Percona Server and MySQL are both popular open-source relational database management systems, but they have distinct differences that can influence the choice of one over the other based on specific needs. Here’s a comparison of the two:

Percona Server


  • Enhanced performance features and optimizations over standard MySQL, particularly under high load and large-scale deployments.
  • Includes additional tools for monitoring and tuning, such as Percona Monitoring and Management (PMM).


  • Better suited for large-scale environments with advanced replication and clustering options.
  • Percona XtraDB Cluster offers enhanced high availability and scalability.


  • Additional security features and improvements over standard MySQL.
  • Regular updates and patches focused on security enhancements.

Support and Community:

  • Strong community support with extensive documentation and forums.
  • Professional support services offered by Percona for enterprises needing expert assistance.


  • Free and open-source, with paid support options available.


  • Fully compatible with MySQL, allowing easy migration and integration with MySQL tools and applications.



  • Standard performance suitable for many applications.
  • MySQL Enterprise Edition includes additional performance features but requires a paid license.


  • Adequate for many medium to large applications.
  • MySQL Group Replication and InnoDB Cluster provide high availability and scalability.


  • Strong security features, with regular updates and patches.
  • MySQL Enterprise Edition includes advanced security features, but these require a paid license.

Support and Community:

  • Extensive community support with a vast amount of resources, documentation, and user forums.
  • Oracle offers professional support through MySQL Enterprise Edition.


  • Community Edition is free and open-source.
  • Enterprise Edition requires a paid license for additional features and support.


  • Widely supported by many applications and tools.
  • Extensive ecosystem with numerous third-party integrations and plugins.

Choosing Between Percona Server and MySQL

  • Performance Needs: If your application requires enhanced performance, particularly under heavy load, Percona Server might be the better choice due to its optimizations and advanced features.
  • Scalability and High Availability: For large-scale deployments and environments needing high availability, Percona’s advanced clustering and replication options offer significant advantages.
  • Cost Considerations: Both offer free versions, but if you need enterprise-level features and support, Percona provides a cost-effective alternative to MySQL’s paid Enterprise Edition.
  • Compatibility and Ecosystem: Both are fully compatible with each other and with a wide range of tools and applications, making either a viable choice for most use cases.

Ultimately, the choice between Percona Server and MySQL will depend on your specific requirements for performance, scalability, support, and cost.

Environment Specification

We are using a minimal CentOS 8 KVM with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – CentOS 8.2
  • Hostname –
  • IP Address – /24

Update Linux Operating System

Connect with as root user by using a ssh client.

It is a good practice to update Linux software packages before installing a new software. We recommend you to upgrade centos 7 to 8, if you have not already did so.

# dnf update -y
Last metadata expiration check: 0:01:56 ago on Fri 20 Nov 2020 08:22:31 PM PKT.
Dependencies resolved.
Nothing to do.

Software packages in our Linux operating system are already up-to-date.

Verify the operating system and Linux Kernel version that are being used in this installation guide.

# uname -r

# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

Install Percona Yum Repository

There are different ways to install Percona Server for MySQL. You can install it by using RPMs, Source Code or Official Yum Repository.

Since, you are working on Red Hat based Linux distro, therefore, the most convenient method is to install it from their official yum repository.

Therefore, you need to install Percona yum repository in your Linux server.

# dnf install -y
Installing Percona Yum Repository
Installing Percona Yum Repository

Percona yum repository also installs percona-release script. This script is used to enable/disable additional yum repositories.

Execute the following command to enable Percona server 8.0 repository and disable all other MySQL yum repositories.

# percona-release setup ps80
Enable Percona Server 8 Yum Repo
Enable Percona Server 8 Yum Repo

Build cache for newly installed yum repositories.

# dnf makecache
CentOS-8 - AppStream                            3.6 kB/s | 4.3 kB     00:01
CentOS-8 - Base                                 3.5 kB/s | 3.9 kB     00:01
CentOS-8 - Extras                               1.2 kB/s | 1.5 kB     00:01
Percona Release release/noarch YUM repository   4.3 kB/s | 2.9 kB     00:00
Percona Server 8.0 release/x86_64 YUM repositor 4.4 kB/s | 2.9 kB     00:00
Percona Tools release/x86_64 YUM repository     4.1 kB/s | 2.9 kB     00:00
Metadata cache created.

Install Percona Server on CentOS 8

You can now install Percona RDBMS by using dnf command.

# dnf install -y percona-server-server
Install Percona Server on CentOS 8
Install Percona Server on CentOS 8

Enable and start mysqld.service.

# systemctl enable --now mysqld.service
Created symlink /etc/systemd/system/ â /usr/lib/systemd/system/mysqld.service.

Verify the version of your database server.

# mysql -V
mysql  Ver 8.0.21-12 for Linux on x86_64 (Percona Server (GPL), Release 12, Revision 7ddfdfe)

Configure Percona MySQL Server

On first startup, the mysqld.service generates a random password for root user.

You can obtain auto generated root password from mysqld.service logs by executing following command.

# grep "temporary password" /var/log/mysqld.log
2020-11-20T15:48:32.560387Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: cjk-4sB/bWWt

Secure your database machine by executing mysql_secure_installation command and configure the security options as follows.

# mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:

The existing password for the user account root has expired. Please set a new password.

New password:

Re-enter new password:
The 'validate_password' component is installed on the server.
The subsequent steps will run with the existing configuration
of the component.
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : N

 ... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...

 - Removing privileges on test database...

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y

All done!

Percona Server for MySQL has been installed and configured on your Linux machine.

Login to MySQL shell as root user.

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 22
Server version: 8.0.21-12 Percona Server (GPL), Release 12, Revision 7ddfdfe

Copyright (c) 2009-2020 Percona LLC and/or its affiliates
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.


List down the available databases in your server.

mysql> show databases;
| Database           |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
4 rows in set (0.01 sec)

Check the version of your database server.

mysql> select version();
| version() |
| 8.0.21-12 |
1 row in set (0.00 sec)

Exit from MySQL shell.

mysql> exit

A recommended book on MySQL RDBMS is Murach’s MySQL (3rd Edition) (PAID LINK) by Joel Murach.

Final Thoughts

In conclusion, installing Percona Server on CentOS 8 is a straightforward process when you follow the correct steps. Percona Server offers enhanced performance, reliability, and features, making it an excellent choice for your database needs.

If you need further assistance with installing Percona Server on Linux or any other database-related tasks, I’m here to help. Check out my Fiverr service for professional and reliable support: Linux Server Admin. I provide step-by-step guidance and expert advice to ensure your Percona Server installation and configuration are done correctly. Let’s get your database running smoothly!

Leave a Reply

Your email address will not be published. Required fields are marked *