mysql5.7安装上后,会生成随机密码,登录时需要查看cat /var/log/mysqld.log ,
里面有随机生成的密码
[Note] A temporary password is generated for [email protected]: 2Hh,uKryPJ-k
登录成功后,会强制要求先改密码
修改密码会报错
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
原因是mysql增强了安全性,对密码要求较严格
alter user ‘root‘@‘localhost‘ identified by ‘2HhuKryPJ-k‘;
时间: 2024-10-07 11:56:19