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)
再去执行给用户赋值、修改密码操作,就成功了。