[Linux服務器使用] 解決遠程連接mysql錯誤1130

解決遠程連接mysql錯誤1130

遠程連接Mysql服務器的數據庫,錯誤代碼是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server

猜想是無法給遠程連接的用戶權限問題。
這樣子操作mysql庫,即可解決。

在本機登入mysql後,更改 “mysql” 數據庫裏的 “user” 表裏的 “host” 項,從”localhost”改稱’%'即可
mysql -u root -p  
use mysql;  
select host,user from user;  
update user set host = '%' where user ='root'; 
//刷新服務
flush privileges;  
select host,user from user;  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章