How to install Percona MySQL 5.7 on CentOS 7

The easiest way to install the Percona Yum repository is to install an RPM that configures yum and installs the Percona GPG key.

Step 1: Install the Percona repository

We can install Percona yum repository by running the following command.

# yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

Retrieving https://repo.percona.com/yum/percona-release-latest.noarch.rpm
Preparing...                ########################################### [100%]
1:percona-release        ########################################### [100%]

To install Percona Server with SELinux policies, you also need the Percona-Server-selinux-*.noarch.rpm package:

# yum install http://repo.percona.com/centos/7/RPMS/x86_64/Percona-Server-selinux-56-5.6.42-rel84.2.el7.noarch.rpm

Test the repository with the below command.

# yum list | grep percona

You should see output similar to the following:

...
Percona-Server-57-debuginfo.x86_64      5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-client-57.x86_64         5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-devel-57.x86_64          5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-server-57.x86_64         5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-shared-57.x86_64         5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-shared-compat-57.x86_64  5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-test-57.x86_64           5.7.10-3.1.el7                 @percona-release-x86_64
Percona-Server-tokudb-57.x86_64         5.7.10-3.1.el7                 @percona-release-x86_64
...

Step 2: Install the Percona Server

Install the Percona Server by running below command.

# yum install Percona-Server-server-57

Step 3: Run Percona Server

Percona Server stores the data files in /var/lib/mysql/ by default. You can find the configuration file that is used to manage Percona Server in /etc/my.cnf.

Start the Percona service with the below command:

# systemctl start mysql

Next, check the service status by running below command:

# systemctl status mysql

Stop the service by running below command:

# systemctl stop mysql

Restart the service by running by running below command:

# systemctl restart mysql

Once, service is started check the mysql root password by running below command:

# grep 'temporary password' /var/log/mysqld.log

Next reset the password to the one of your choice by logging into the mysql console.

# mysql -u root –p
# ALTER USER 'root'@'localhost' IDENTIFIED BY 'StrongPassword';
# flush privileges;

This completes the Percona MySQL 5.7 installation tutorial. Enjoy using Percona MySQL!

 

Please follow and like us:

ZT Admin

Leave a Reply

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

Next Post

How to backup Microsoft Exchange Server

Mon Jul 22 , 2019
We can use Windows Server Backup to back up and restore Exchange server. Exchange includes a plug-in for Windows Server Backup that allows us to make Volume Shadow Copy Service (VSS)-based backups of the Exchange data. Note: The Windows Server Backup feature must be installed on the local computer. Use […]