解決遠程連接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;