天下事有难易乎?为之,则难者亦易矣;不为,则易者亦难矣。

首次进入Mysql修改密码报“The MySQL server is running with the –skip-grant-tables option so it cannot execute”

往事如烟 3797次浏览 0个评论

第一次安装完mysql,或忘记密码,修改默认密码的时候,结果报“The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement”。

先刷新mysql然后再重新修改密码即可。

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
 
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.01 sec)

刷新完,重新执行密码修改。


发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址