mysql錯誤:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解決方法


本文為大家講解的是mysql錯誤:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解決方法,感興趣的同學參考下。

錯誤描述:

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';

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.01 sec)

# 把在所有數據庫的所有表的所有權限賦值給位於所有IP地址的root用戶。

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';

Query OK, 0 rows affected (0.00 sec)

 

 

 

2、遠程連接設置

把在所有數據庫的所有表的所有權限賦值給位於所有IP地址的root用戶。

mysql> grant all privileges on *.* to root@'%'identified by 'password';

如果是新用戶而不是root,則要先新建用戶

mysql>create user 'username'@'%' identified by 'password';  

此時就可以進行遠程連接了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM