MySQL关于ERROR 1290 (HY000)报错解决方法

一个问题纠结很久,反复确认语法问题。但是后来网上搜了一下,茅塞顿开。特此总结一下。

mysql> grant select,insert,update,delete on *.* to 'root'@'%';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

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

mysql> 
mysql> 
mysql> 
mysql> grant select,insert,update,delete on *.* to 'root'@'%';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> grant all on *.* to 'root'@'%';
Query OK, 0 rows affected (0.00 sec)

解释说明:

对root用户进行授权远程登录,然后发现报错ERROR 1290 (HY000)

然后进行flush privileges。

然后再次执行授权,问题解决。

以上就是简单的解决方法,感谢大家的阅读和对的支持。