ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot exe

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
 

在安装Mysql8.0.3过程中重置密码时报了这个错误, 原因是没有设置密码时需要在/etc/my.cnf中添加这段时才能操作mysql

#跳过密码验证

skip-grant-tables

但是添加完这句后操作mysql又报了这个错误, 这就成了一个死循环, 最后发现了解决办法,

这是因为权限设置了但还没有刷新导致的。 

先执行  

flush privileges;

 再执行sql语句, 成功了

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';

 

你可能感兴趣的:(BUG,mysql)