連接失敗!null, message from server: “Host ‘xxxx‘ is not allowed to connect to this MySQL server“


連接數據庫。
mysql   -u賬號    -p密碼
show databases;
use root;  //選擇需要改的用戶
select user,host from user;   //可以看到user為root,host為localhost的話,說明mysql只允許本機連接,那么外網,本地軟件客戶端就無法連接了。
update user set host = '%' where user='root';
flush privileges;    //刷新權限

 


免責聲明!

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



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