MySQL:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

解决方法:

    修改密码:alter user 'root'@'localhost' identified by '123456';

mysql> use mysql;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> use mysql;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> alter user 'root'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.15 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.05 sec)

mysql> use mysql
Database changed
mysql>

红线处的密码为新密码

猜你喜欢

转载自www.cnblogs.com/lifan1998/p/9177267.html