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

mysql 5.7版本安装后,首次操作,总是报错:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

解决办法:
mysql> SET PASSWORD = PASSWORD(‘root’);
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> ALTER USER ‘root’@'localhost’ PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.00 sec)

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

此条目发表在 异常解决办法 分类目录。将固定链接加入收藏夹。

评论功能已关闭。