Host is not allowed to connect to this MySQL server
2009-11-13 12:54
411 查看
如果你想连接你的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
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的远程帐号(Host 'XXX' is not allowed to connect to this MySQL server 解决方案)
- 远程连接MySQL数据库提示错误Host is not allowed to connect this MySQL server
- MYSQL远程连接出现Host * is not allowed to connect to this MySQL server
- Host 'admin-PC' is not allowed to connect to this MySQL server
- MySQL : 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- 1103 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 开放mysql远程连接 不使用localhost
- SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MySQL server怎么解决?
- ERROR 1130: Host 'xxx' is not allowed to connect to this MySQL server
- 解决ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server 方法
- HOSt ip is not allowed to connect to this MySql server
- mysql ERROR 1130: Host ’localhost′ is not allowed to connect to this MySQL server
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
- Host '127.0.0.1' is not allowed to connect to this MySQL server
- MySQL Error 1130 Host 'localhost' is not allowed to connect to this MySQL server
- 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server
- 报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost