安装mysql yum repository
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
安装mysql
yum -y install mysql-community-server.x86_64
启动mysql
service mysqld start
查找mysql临时密码
grep "password" /var/log/mysqld.log
登录
mysql -uroot -p
copy上面的临时密码进行登录
修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mySql123!';