1.# wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
Download MySQL Source installation package
2.# Yum Localinstall mysql57-community-release-el7-8.noarch.rpm
Install MySQL source
3.# yum Repolist enabled|grep "mysql.*-community.*"
Check that the MySQL source is installed successfully
4.# Yum Install Mysql-server
Install MySQL If there is a display [y/n] Direct output y is OK
5.# systemctl Start mysqld
# systemctl Status mysqld
Start MySQL
6.# Systemctl Enable Mysqld
# Systemctl Daemon-reload
Boot up
7.# grep ' temporary password '/var/log/mysqld.log
# mysql-u Root-p
Modify the root local login password, and after the MySQL installation is complete, a default password is generated for root in the/var/log/mysqld.log file. Locate the root default password in the following way, and then log in to MySQL to modify it:
Centos7 installing Mysql (Ubuntu)