1: yum安装5.7和获取初始密码

wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
yum install mysql-community-server
grep 'pass' /var/log/mysqld.log

重置MySQL root密码:

5.7.6之前:
SET PASSWORD = PASSWORD('123456');

5.7.6之前:
ALTER USER USER() IDENTIFIED BY '123456';

你可能感兴趣的:(1: yum安装5.7和获取初始密码)