Mysql遠程鏈接報錯:SQL Error (1130): Host '192.168.61.128' is not allowed to connect to this MySQL server

Mysql遠程鏈接報錯:SQL Error (1130): Host '192.168.0.18' is not allowed to connect to this MySQL server

經過SQLyog鏈接linux中的MySQL報錯問題:
SQL Error (1130): Host '192.168.0.18' is not allowed to connect to this MySQL server
說明你所鏈接的用戶帳戶沒有遠程鏈接的權限,只能在本機localhost登陸
須要更改 mysql 數據庫裏的 user表裏的 host字段 把localhost改稱%
下面是我設置的遠程鏈接步驟,請參考:
 1.登陸MySQL
  mysql -uroot -proot
2.進入數據庫
  use mysql;
3.查看是否有user表
 show tables;
4.更改lost字段值
 update user set host='%' where host = 'localhost';
5.刷新
 flush privileges;
6.查看
 select host,user from user;

出現上面的界面,說明遠程鏈接成功,最後quit退出了。。
相關文章
相關標籤/搜索