Bobcares

Install Percona MySQL 5.7 CentOS 7: Tutorial

by | Nov 4, 2021

Install Percona MySQL 5.7 CentOS 7 with guidance from the experts at Bobcares

At Bobcares, we come up with solutions with different kinds of queries all day as a part of our Server Management Service.

Let’s take a look at how our skilled Support Techs install Percona Server for MySQL with ease.

Install Percona MySQL 5.7 CentOS 7

If you are trying to install the Percona Server for MySQL from Percona yum repository, you have come to the right place. Our Support Engineers are here with an easy way to get this done via sudo command or as the root user.

  1. First, run the following command as root user or via sudo to install Percona yum repository:
    yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

    This will give the following output:

    Retrieving https://repo.percona.com/yum/percona-release-latest.noarch.rpm
    Preparing...                ########################################### [100%]
    1:percona-release        ########################################### [100%]
  2. Next, we will ensure the packages are available from the repository with the following command:
    yum list | grep percona

    As a result, you will see a similar output:

    ...
    Percona-Server-57-debuginfo.x86_64      5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-client-57.x86_64         5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-devel-57.x86_64          5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-server-57.x86_64         5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-shared-57.x86_64         5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-shared-compat-57.x86_64  5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-test-57.x86_64           5.7.31-34.1.el7                 @percona-release-x86_64
    Percona-Server-tokudb-57.x86_64         5.7.31-34.1.el7                 @percona-release-x86_64
    ...
    
    .. note::
    
    For a RHEL 8 package installation, the mysql module must be disabled.
  3. After that, we will install the Percona Server with this command:
    yum install Percona-Server-server-57

Our Support Engineers would like to remind you that the Percona Server for MySQL 5.7 comes with TokuDB storage engine.

Running Percona Server for MySQL 5.7</strong

  1. First start Percona Server for MySQL with this command:
    service mysql start
  2. Then, we will confirm the service is running with the following command:
    service mysql status
  3. After that, we can also stop the service with the command:
    service mysql stop
  4. Next, restart the service with:
    service mysql restart

We can also invoke these commands with sytemctl as well since CentOS 7 and RHEL 7 come with systemd as the default system as well as service manager.

How to configure MySQL?

First, we will get hold of a temporary password with the following command:

grep "temporary password" /var/log/mysqld.log

Then, we will run this command to secure MySQL:

mysql_secure_installation

How to remove MySQL validate password plugin?

Our SupportTechs recommend removing the MYSQL validate password plugin by logging in to MySQL server as root with this command:

mysql -h localhost -u root -p

Then, we will run this SQL command:

uninstall plugin validate_password;

How to uninstall Percona Server for MySQL?

We can also easily uninstall Percona Server for MySQL with these steps:

  1. First, stop the Percona Server for MySQL with
    service mysql stop
  2. Then, remove the packages with this command:
    yum remove Percona-Server*
  3. After that, we will remove the data and configuration files by running this command:
    rm -rf /var/lib/mysql
    rm -f /etc/my.cnf

In conclusion, this will delete all the data files and remove all the packages, it is a good idea to take a backup before going ahead with the uninstall.

[Need assistance with Server Management? We are here to help.]

Conclusion

At the end of the day, the Support Techs at Bobcares demonstrated how to install Percona MySQL 5.7 on CentOS along with a couple of additional tricks.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.