1. 下载
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
2. 安装
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
3. 启动
service mysqld restart
4. 查看密码,修改密码
grep "password" /var/log/mysqld.log
可以看到安装的时候的临时密码,登录之后修改密码
alter user 'root'@'localhost' identified by 'password';