拼多多免費(fèi)發(fā)紅包在哪(拼多多免費(fèi)發(fā)紅包在哪領(lǐng))
2023-11-23
更新時(shí)間:2023-11-23 00:09:29作者:佚名
Navicat for mysql 1130錯(cuò)誤 用Navicat連接遠(yuǎn)程MYSQL,提示如下錯(cuò)誤,我以為是自己的防火墻問(wèn)題,但是關(guān)了,依然不行。
我認(rèn)為這段英文,有點(diǎn)誤導(dǎo),讓人感覺(jué)是自己這邊出了問(wèn)題。
看解決方法吧
ERROR 1130: Host '192.168.1.3' is not allowed to connect to thisMySQL server
解決方法:
1。改表法??赡苁悄愕膸ぬ?hào)不允許從遠(yuǎn)程登陸,只能在localhost。這個(gè)時(shí)候只要在localhost的那臺(tái)電腦,登入mysql后,更改"mysql" 數(shù)據(jù)庫(kù)里的 "user" 表里的 "host"項(xiàng),從"localhost"改稱"%"
mysql -u root -pvmwaremysql>usemysql;mysql>update user set host = '%' where user ='root';mysql>select host, user from user;
2.授權(quán)法。例如,你想myuser使用mypassword從任何主機(jī)連接到mysql服務(wù)器的話。
GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY 'mypassword' WITHGRANT OPTION;
如果你想允許用戶myuser從ip為192.168.1.3的主機(jī)連接到mysql服務(wù)器,并使用mypassword作為密碼
GRANT ALL PRIVILEGES ON *.* TO IDENTIFIED BY'mypassword' WITH GRANT OPTION;
方法二:
錯(cuò)誤代碼是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是無(wú)法給遠(yuǎn)程連接的用戶權(quán)限問(wèn)題
給用戶授權(quán)
我用的用戶是root 密碼123456
首選語(yǔ)法為:
Sql代碼
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
示例:
Sql代碼
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
執(zhí)行完后,再
mysql:flush privileges;
刷新一下權(quán)限就可以了,不用重啟
完整操作:
開(kāi)始->運(yùn)行->cmd
cd/
cd mysql安裝目錄/bin
mysql -u root -p123456;
mysql GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
mysql flush privileges;
作者 heisetoufa