wget https://repo.mysql.com//mysql80-community-release-el7-3.noarch.rpm
rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
yum install mysql-community-server
systemctl start mysqld
systemctl enable mysqld
vim /var/log/mysqld.log
grep 'temporary password' /var/log/mysqld.log
ALTER USER 'root'@'localhost' IDENTIFIED BY '你的新密码';
注意,这里的密码至少包含一位数字,一位大写字母,一位特殊符号,总长度大于8个字符
网友评论