1. 程式人生 > >1130-host ... is not allowed to connect to this MySql server,訪問許可權不夠

1130-host ... is not allowed to connect to this MySql server,訪問許可權不夠

問題描述:

               別人連線我mysql伺服器時提示:1130-host  ...  is not allowed to connect to this MySql server

               

原因:自己本地mysql伺服器設定的許可權只能本地訪問

解決:cmd進入到mysql,有不會的可以參考:https://blog.csdn.net/Demis_demis/article/details/84257663

mysql>use mysql;

mysql>update user set host = '%' where user ='root';    //這樣就賦予了任何主機訪問資料的許可權

再次嘗試遠端訪問資料庫就可以啦(如果還不行就看一下防火牆有沒有關)