Skip to end of metadata
Go to start of metadata

To install MySQL 5.7, you should enable MySQL 5.7 community release yum repository on your system.

STEP 1. Enable MySQL Repository

yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm


STEP 2. Install MySQL 5.7 Server

yum install mysql-community-server


STEP 3. Start MySQL Service

service mysqld start


STEP 4. Checking temporary password

grep 'A temporary password' /var/log/mysqld.log | tail -1

Then you will be able to see its result like below:

2020-04-20T01:50:07.931468Z 1 [Note] A temporary password is generated for root@localhost: #l+wu>PMv7vJ



STEP 5. Initial MySQL Configuration

/usr/bin/mysql_secure_installation

Note you can use the temporary password acquired at STEP 4.