Host ip is not allowed to connect to this MySQL server
2011-05-26 11:09
519 查看
解决方法:
mysql命令行运行--
mysql> Grant all privileges on *.* to 'root'@'%' identified by ‘password’with grant option;
(%表示是所有的外部机器,如果指定某一台机,就将%改为相应的机器名;‘root’则是指要使用的用户名,)
mysql> flush privileges;
(运行此句才生效,或者重启MySQL)
----------------------------------------------
实例--错误编号:1130
问题分析:
MySQL 没有开放远程登录的权限。
解决方法:
1、请确认您填写的数据库服务器是否正确,并且授权你这台 web 服务器进行连接;
2、如何授权 MySQL 的远程帐号,请参照 如何开启MySQL的远程帐号
需要修改用户的访问权限,使用如下方法修改
update mysql.user set host='%' WHERE user='test';
update mysql.db set host='%' where user='test';
flush privileges;
如此test用户就可以在任意地点访问mysql数据库了.
若还不行请注意一下防火墙是否允许3306端口的访问.
--------------------------------------------------
或者:在my.cnf文件里注释掉skip network!
mysql命令行运行--
mysql> Grant all privileges on *.* to 'root'@'%' identified by ‘password’with grant option;
(%表示是所有的外部机器,如果指定某一台机,就将%改为相应的机器名;‘root’则是指要使用的用户名,)
mysql> flush privileges;
(运行此句才生效,或者重启MySQL)
----------------------------------------------
实例--错误编号:1130
问题分析:
MySQL 没有开放远程登录的权限。
解决方法:
1、请确认您填写的数据库服务器是否正确,并且授权你这台 web 服务器进行连接;
2、如何授权 MySQL 的远程帐号,请参照 如何开启MySQL的远程帐号
需要修改用户的访问权限,使用如下方法修改
update mysql.user set host='%' WHERE user='test';
update mysql.db set host='%' where user='test';
flush privileges;
如此test用户就可以在任意地点访问mysql数据库了.
若还不行请注意一下防火墙是否允许3306端口的访问.
--------------------------------------------------
或者:在my.cnf文件里注释掉skip network!
相关文章推荐
- HOSt ip is not allowed to connect to this MySql server
- host ip is not allowed to connect to this MySql server解决方案
- 远程连接服务器出现 SQL Error (1130): Host IP is not allowed to connect to this MySQL server 错误
- MySql - SQL Error (1130): Host IP is not allowed to connect to this MySQL server
- 關於添加Mysql sytsemdsn 時出現SQL Error (1130): Host IP is not allowed to connect to this MySQL server錯誤的解決方案
- MySql - SQL Error (1130): Host IP is not allowed to connect to this MySQL server
- HOSt ip is not allowed to connect to this MySql server
- HOSt ip is not allowed to connect to this MySql server
- HOSt ip is not allowed to connect to this MySql server
- HOSt ip is not allowed to connect to this MySql server
- SQL Error (1130): Host IP is not allowed to connect to this MySQL server
- SQL Error (1130): Host IP is not allowed to connect to this MySQL server
- Mysql 远程连接错误:1130-host IP is not allowed to connect to this MySql server
- SQL Error (1130): Host IP is not allowed to connect to this MySQL server
- HOSt ip is not allowed to connect to this MySql server
- SQL Error (1130): Host IP 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
- HOSt ip is not allowed to connect to this MySql server, MYSQL添加远程用户或允许远程访问三种方法
- HOST ip is not allowed to connect to this MySql server
- HOSt ip is not allowed to connect to this MySql server, MYSQL添加远程用户或允许远程访问三种方法