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

linux mysql数据库设置的密码过于简单,做数据库操作提示
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

解决:
输入命令
ALTER USER 'root'@'localhost' IDENTIFIED BY '密码' PASSWORD EXPIRE NEVER;

flush privileges;

即可设置简单的数据库密码进行操作数据库

posted @ 2022-09-11 23:44  huashui  阅读(102)  评论(0)    收藏  举报