使用yum安装MySQL5.7

从mysql网站查找对应版本的yum源:https://dev.mysql.com/downloads/			
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server

systemctl start  mysqld.service
grep "password" /var/log/mysqld.log

mysql -uroot -p 
set global validate_password_policy=0;
set global validate_password_length=1;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
FLUSH  PRIVILEGES;

yum -y remove mysql57-community-release-el7-10.noarch

vi /etc/my.conf
[mysqld]
validate_password=OFF