0

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

jk created at6 years ago view count: 2447

mysql -uroot -p 登录后, 执行任意一条语句都返回该错误。

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

MySQL 版本 5.7.10

report
回复
0

执行下 SET PASSWORD = PASSWORD('new_password');

参考: https://dev.mysql.com/doc/refman/5.6/en/alter-user.html

mysql> SELECT 1;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
\mysql> SET PASSWORD = PASSWORD('new_password');
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
6 years ago 回复

Recommend