0
点赞
收藏
分享

微信扫一扫

mysql报错:You must reset your password using ALTER USER statement before executing this statement.

凉夜lrs 2023-10-14 阅读 80
新安装mysql后,登录后,执行任何命令都会报错:You must reset your password using ALTER USER statement before executing this statement.

mysql报错:You must reset your password using ALTER USER statement before executing this statement._ide

【解决办法】

MySQL版本5.7.6版本以前用户可以使用如下命令:

mysql> SET PASSWORD = PASSWORD('Admin2022!');

MySQL版本5.7.6版本开始的用户可以使用如下命令:

mysql> alter user 'root'@'localhost' identified by '123456';

执行报错,修改语句如下:

mysql> ALTER USER USER() IDENTIFIED BY '123456';

执行成功

举报

相关推荐

0 条评论