1 download mysql mirror
Wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-server-5.7.25-1.el7.x86_64.rpm
Wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-client-5.7.25-1.el7.x86_64.rpm
Wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-common-5.7.25-1.el7.x86_64.rpm
Wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-community-libs-5.7.25-1.el7.x86_64.rpm
2 install the corresponding software
Yum install.net y - view x86_64 libaio. X86_64 perl. X86_64
Three output bring mairadb
Yum remove - y mariadb - libs. X86_64 ql server
5 query the default password
Grep 'password'/var/log/mysqld log
4. Install Mys
Yum install - mysql - community * y
6 change passwords
Mysqladmin uroot - p 'es, W; Ya (K1Th QianFeng @ 'password' 123 '
7 login
Mysql - uroot - p 'QianFeng @ 123'