遠端連線MYSQL提示1130錯誤

2021-06-07 23:51:00 字數 880 閱讀 4919

如果你想連線你的mysql的時候發生這個錯誤:

error 1130: host '192.168.1.3' is not allowed to connect to this mysql server

1。 改表法。可能是你的帳號不允許從遠端登陸,只能在localhost。這個時候只要在localhost的那台電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"

mysql -u root -pvmwaremysql>use mysql;

mysql>update user set host = '%' where user = 'root';

mysql>select host, user from user;

2. 授權法。例如,你想myuser使用mypassword從任何主機連線到mysql伺服器的話。

grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;

如果你想允許使用者myuser從ip為192.168.1.3的主機連線到mysql伺服器,並使用mypassword作為密碼

grant all privileges on *.* to 'root'@'192.168.1.3' identified by 'mypassword' with grant option;

grant all privileges on *.* to 'root'@'192.168.1.3' identified by '1235' with grant option;

mysql>flush privileges;  這句一定要加上!!!

mysql無法遠端連線 1130

可能是你的帳號不允許從遠端登陸,只能在localhost。這個時候只要在localhost的那台電腦,登入mysql後,更改 mysql 資料庫裡的 user 表裡的 host 項,從 localhost 改稱 mysql u root p mysql use mysql mysql update ...

mysql遠端連線報1130

原因 遠端連線沒有許可權 解決方法 設定ip許可權 1 使用本地連線mysql mysql u root p 2 使用mysql庫 mysql use mysql 3 查詢root使用者的host mysql select host from user where user root 4 更新roo...

解決遠端連線mysql錯誤1130

mysql 遠端連線mysql伺服器的資料庫,錯誤 是1130,error 1130 host is not allowed to connect to this mysql server 猜想是無法給遠端連線的使用者許可權問題。這樣子操作mysql庫,即可解決。在本機登入mysql後,更改 mys...