下载mysql源
wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
安装源
rpm -ivh mysql57-community-release-el7-8.noarch.rpm
安装程序
yum -y install mysql-server
如果错密药不对
执行:rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
启动程序
systemctl start mysqld
找密码
cat /var/log/mysq.log |grep password
改密码
set password for root@localhost=password('Aa-111111')