標籤:error n0.1130 mysql
用SQLyog測試Mysql時提示:
ERROR N0.1130 Host ‘192.168.100.111‘is not allowed to connect to this MYSQL server
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/6D/CC/wKiom1VsAdig8J8RAAB-g30Pa6I714.jpg" title="QQ20150601145447.png" alt="wKiom1VsAdig8J8RAAB-g30Pa6I714.jpg" />
解決方案:
1、改表法。
可能是你的帳號不允許從遠程登陸,只能在localhost。這個時候只要在localhost的那台電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"
mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"
mysql -u root -p root
mysql>use mysql;
mysql>update user set host = ‘%‘ where user = ‘root‘;
mysql>flush privileges;
mysql>select host, user from user\G;
2. 授權法。
例如,你想mysqladmin使用mypassword從任何主機串連到mysql伺服器的話。
GRANT ALL PRIVILEGES ON *.* TO ‘mysqladmin‘@‘%‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
如果你想允許使用者myuser從ip為192.168.1.3的主機串連到mysql伺服器,並使用mypassword作為密碼
GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘192.168.1.3‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
本文出自 “廣州、雨人” 部落格,請務必保留此出處http://liulihuan.blog.51cto.com/8018739/1657113
MYSQL錯誤: NO.1130 ERROR的解決