rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
yum repolist all | grep mysql
vi /etc/yum.repos.d/mysql-community.repo
把8.0enabled改为1就可以了,其他的版本改为0
yum repolist enabled | grep mysql
yum install -y mysql-community-server
systemctl start mysqld
systemctl status mysqld
开机启动设置
systemctl enable mysqld
systemctl daemon-reload
登录MySql并修改root密码
mysql -uroot -p
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'new psd';
修改密码复杂度
set global validate_password.policy=0;
set global validate_password.length=1;