Install Percona MySQL on CentOS7.

How to Install Percona MySQL on CentOS 7

Step 1: Install the Percona MySQL repository.

In this topic we will discuss about how to install percona Mysql 5,7 on centOS7.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:

Test the repository with the below command.(Install Percona MySQL on CentOS7)

# 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 How to install Percona Mysql on centOS 7. Enjoy using Percona MySQL!

Next Topic:-Click Here

Leave a Reply