Mysql登入許可權問題 1130

2021-09-26 14:31:53 字數 503 閱讀 4874

在公司內網中使用電腦訪問另一台電腦上的mysql資料庫時,連線會出現1130的錯誤,錯誤原因是因為使用者沒有其他電腦登入本地資料庫的許可權,需要對資料庫中的使用者許可權進行修改:

直接修改資料庫中的使用者表中的主機內容:

->use mysql;

->update user set host='%' where user='username';

->flush privileges;

->select host,user from user;

(或者授權使用者可以通過其他任何主機進行連線mysql伺服器:

grant all privileges on *.* to 'username'@'%' identified by 'password' with grant option;

*.*:表示任意庫中的任意表;

%:表示任意ip的主機;)

root 使用者無法本地登入mysql資料庫,localhost和127.0.0.1登入mysql有啥區別請參見:

mysql遠端登入許可權問題

遠端連線mysql資料庫的時候,報錯 出現 error 1130 hy000 host 192.168.14.1 is not allowed to connect to this mysql server提示資訊,不能遠端連線資料庫。解決方案如下 這個時候只要在localhost的那台電腦,登入m...

mysql許可權登入問題 1045

mysql 中使用root 使用者登入出現 error 1045 28000 access deniedforuser root localhost using password yes 錯誤產生的原因是 root 使用者沒有 localhost 登入的許可權,修改 etc my.cnf 資料庫配置...

(Mysql)連線問題之1130

訪問遠端伺服器上的mysql資料庫連線是報 1130 host is not allowed to connect this mysql severe 解決方案 登入遠端伺服器下的mysql下。mysql update user set host locallhost where user root...