1.my.cnf 添加skip-grant-tables 并重启mysqld
2.use mysql; update user set authentication_string=password(‘123456’),password_expired=‘N’ where user=‘root’;
3.或者ALTER USER testuser IDENTIFIED BY ‘123456’ PASSWORD EXPIRE NEVER;
1.my.cnf 添加skip-grant-tables 并重启mysqld
2.use mysql; update user set authentication_string=password(‘123456’),password_expired=‘N’ where user=‘root’;
3.或者ALTER USER testuser IDENTIFIED BY ‘123456’ PASSWORD EXPIRE NEVER;