解决The MySQL server is running with the --skip-grant-tables option so it cannot execute this state问题

mysql配置文件中添加skip-grant-tables后登录修改密码,报错如下:

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解决方法:先刷新一下权限表,把在所有数据库的所有表的所有权限赋值给位于所有IP地址的root用户。

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

再去执行给用户赋值、修改密码操作,就成功了。

本文为原创文章,转载请注明出处。

原文链接:https://850406.xyz/post/解决the-mysql-server-is-running-with-the---skip-grant-tables-option-so-it-cannot-execute-this-state问题

评论(0)

还没有评论,来抢沙发吧~

验证码