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
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:
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
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:
Ultimately, the choice between Percona Server and MySQL will depend on your specific requirements for performance, scalability, support, and cost.
We are using a minimal CentOS 8 KVM with following specifications.
Connect with percona-01.centlinux.com 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. Complete!
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 4.18.0-193.28.1.el8_2.x86_64 # cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core)
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 https://repo.percona.com/yum/percona-release-latest.noarch.rpm
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
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.
You can now install Percona RDBMS by using dnf command.
# dnf install -y percona-server-server
Enable and start mysqld.service.
# systemctl enable --now mysqld.service Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service â /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)
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 environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y Success. 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 Success. 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 environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y - Dropping test database... Success. - Removing privileges on test database... Success. 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 Success. 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 owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql>
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 Bye
A recommended book on MySQL RDBMS is Murach’s MySQL (3rd Edition) (PAID LINK) by Joel Murach.
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!
Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…
Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…
Discover how to change Apache port in Linux easily. Follow our simple guide to modify…
Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…
Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…
Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…
This website uses cookies.