1,修改/etc/my.cnf,将下面语句加入到[mysqld]字段下跳过验证并重启。
skip-grant-tables
2,进入到mysql库,修改密码过期选项。
use mysql;
update user set password_expired=’N’ where user=’root’;
3,将跳过密码改回,并重启MySQL。
1,修改/etc/my.cnf,将下面语句加入到[mysqld]字段下跳过验证并重启。
skip-grant-tables
2,进入到mysql库,修改密码过期选项。
use mysql;
update user set password_expired=’N’ where user=’root’;
3,将跳过密码改回,并重启MySQL。