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。
然後再次執行授權,問題解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章