mysql error 1290 hy000:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statemen' 解决方案

如果在执行授权命令的时候报错

mysql> grant all privileges on *.* to 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

是因为在my.ini或my.cnf配置文件中添加了  skip-grant-tables  参数。

 

解决方法:

方法一、删除配置文件中的  skip-grant-tables  参数。

 

方法二:只需刷新权限就行  

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

然后再执行授权命令。

 

posted @ 2016-06-12 17:00  贱书生  阅读(1761)  评论(0编辑  收藏  举报