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
开启mysql服务
systemctl start mysqld.service
查看mysql服务状态
systemctl status mysqld.service
从日志文件中查看mysql root用户初始密码
grep "password" /var/log/mysqld.log
进入mysql
mysql -uroot -p
设置mysql密码
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘new password‘;