当我们修改MySQL密码的时候,修改了配置文件/etc/my.cnf,并且也重启了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
这个时候只需要刷新一下权限即可:
flush privileges;
再次修改密码尝试:
>ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'
Query OK, 0 rows affected (0.01 sec)
修改成功!
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!