You must reset your password using ALTER USER statement before executing this statement.

发布时间:2018-06-17 13:43:31,浏览4622次

安装完MySQL之后,登陆以后,不管运行任何命令,总是提示这个

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

解决方法如下:

step 1: SET PASSWORD = PASSWORD('your new password');

step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;

step 3: flush privileges;

完成以上三步退出再登,使用新设置的密码就行了,以上除了红色的自己修改成新密码外,其他原样输入即可

评论