Mysql-强制改密
MySQL V8.0.22
[mysqld]
# 跳过登录验证
skip-grant-tables
use mysql;
update user set authentication_string = '' where User = 'root' and Host = 'localhost';
flush privileges;
-- 取消跳过登录验证,再进MySQL正常改密
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
flush privileges;

浙公网安备 33010602011771号