解决The MySQL server is running with the --skip-grant-tables option so it cannot execute this state问题
mysql配置文件中添加skip-grant-tables后登录修改密码,报错如下:
1 | mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123'; |
解决方法:先刷新一下权限表,把在所有数据库的所有表的所有权限赋值给位于所有IP地址的root用户。
1 | mysql> flush privileges; |
再去执行给用户赋值、修改密码操作,就成功了。