Host is not allowed to connect to this MySQL server
2012-05-20 19:48
323 查看
转自:http://www.cnblogs.com/wliang22/archive/2009/11/13/1602423.html
如果你想连接你的mysql的时候发生这个错误:
ERROR 1130: Host '210.13.92.66' is not allowed to connect to this MySQL server
请按照如下方法解决:
login as: root ///登陆系统
root@tqwm.cn's password: ///输入密码
Last login: Tue Apr 15 14:06:54 2008 from 210.13.92.66
[root@myserver ~]# /usr/local/mysql/bin/mysql -uroot -hlocalhost -p ///登入mysql
Enter password: ///输入mysql对应用户的密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 431
Server version: 5.0.58-enterprise-gpl-log Source
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. ///登入成功的提示信息
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'rootpasswd' WITH GRANT OPTION; ///输入这段指令并回车后允许所有用root用户并且输入rootpasswd密码的主机登入该mysql Server 如果将'%'换成'10.1.1.1'那么只有10.1.1.1的主机可以登陆.
Query OK, 0 rows affected (0.07 sec)
mysql> \q ///退出mysql
Bye
[root@myserver ~]#
另外还有一种方法转自其他地方
改表法。可能是你的帐号不允许从远程登陆,只能在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;
自己的解决方法:
直接在cmd 下进入mysql\bin 下 运行 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION
如果你想连接你的mysql的时候发生这个错误:
ERROR 1130: Host '210.13.92.66' is not allowed to connect to this MySQL server
请按照如下方法解决:
login as: root ///登陆系统
root@tqwm.cn's password: ///输入密码
Last login: Tue Apr 15 14:06:54 2008 from 210.13.92.66
[root@myserver ~]# /usr/local/mysql/bin/mysql -uroot -hlocalhost -p ///登入mysql
Enter password: ///输入mysql对应用户的密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 431
Server version: 5.0.58-enterprise-gpl-log Source
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. ///登入成功的提示信息
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'rootpasswd' WITH GRANT OPTION; ///输入这段指令并回车后允许所有用root用户并且输入rootpasswd密码的主机登入该mysql Server 如果将'%'换成'10.1.1.1'那么只有10.1.1.1的主机可以登陆.
Query OK, 0 rows affected (0.07 sec)
mysql> \q ///退出mysql
Bye
[root@myserver ~]#
另外还有一种方法转自其他地方
改表法。可能是你的帐号不允许从远程登陆,只能在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;
自己的解决方法:
直接在cmd 下进入mysql\bin 下 运行 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION
相关文章推荐
- jdbc连接mysql时报message from server: "Host '**' is not allowed to connect to this MySQL server"错误解决
- ERROR 1130: Host ’...′ is not allowed to connect to this MySQL server
- mysql远程连接 Host * is not allowed to connect to this MySQL server
- 远程连接MYSQL提示Host is not allowed to connect to this MySQL server
- 解决mysql远程连接Host ‘*’ is not allowed to connect to this MySQL server
- 解决mysql远程连接Host ‘*’ is not allowed to connect to this MySQL server
- 报错:1130-host ... is not allowed to connect to this MySql server
- ERROR 1130: Host xxx is not allowed to connect to this MySQL server
- mysql不支持远程连接的解决办法(#报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用lo
- Host '2003SERVER' is not allowed to connect to this MySQL server
- 解决MySQL ERROR 1130 (HY000): Host 'XXX' is not allowed to connect to this MySQL server
- idea 数据库连接错误 Host '192.168.8.239' is not allowed to connect to this MySQL server"
- 报错:1130-host ... is not allowed to connect to this MySql server
- host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost,
- 127.0.0.1’ is not allowed to connect to this MySQL serverConnection closed by foreign host
- Host 'DESKTOP-QGO5EVD' is not allowed to connect to this MySQL server
- mysql不支持远程连接的解决办法(#1130 - Host 'localhost' is not allowed to connect to this MySQL server)
- 报错:1130-host ... is not allowed to connect to this MySql server
- 远程连接MYSQL提示Host is not allowed to connect to this MySQL server
- mysql不允许其他ip连接 MySql - SQL Error (1130): Host IP is not allowed to connect to this MySQL server