1130-host ... is not allowed to connect to this MySql server
来源:互联网 发布:淘梦网络怎么样 编辑:程序博客网 时间:2024/05/06 06:36
解决方法:
1。 改表法。
可能是你的帐号不允许从远程登陆,只能在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;
2. 授权法。
例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器,并使用mypassword作为密码
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
如果你想允许用户myuser从ip为192.168.1.6的主机连接到mysql服务器的dk数据库,并使用mypassword作为密码
GRANT ALL PRIVILEGES ON dk.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
我用的第一个方法,刚开始发现不行,在网上查了一下,少执行一个语句 mysql>FLUSH RIVILEGES 使修改生效.就可以了
另外一种方法,不过我没有亲自试过的,在csdn.net上找的,可以看一下.
在安装mysql的机器上运行:
1、d:\mysql\bin\>mysql -h localhost -u root //这样应该可以进入MySQL服务器
2、mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION //赋予任何主机访问数据的权限
3、mysql>FLUSH PRIVILEGES //修改生效
4、mysql>EXIT //退出MySQL服务器
这样就可以在其它任何的主机上以root身份登录啦!
- host is not allowed to connect to this MySQL server
- Host is not allowed to connect to this MySQL server
- host ... is not allowed to connect to this MySql server
- Host * is not allowed to connect to this MySQL server
- host is not allowed to connect to this MySql server
- Host is not allowed to connect to this MySQL server
- host ... is not allowed to connect to this MySql server
- Host '***' is not allowed to connect to this MySQL server"
- host ... is not allowed to connect to this MySql server
- Host is not allowed to connect to this mysql server,
- Host '***' is not allowed to connect to this MySQL server
- [MySQL]MySQL Error 1130 Host 'localhost' is not allowed to connect to this MySQL server
- Mysql 远程连接错误:1130-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
- MySQL Error 1130 Host 'localhost' is not allowed to connect to this MySQL server
- mysql:ERROR 1130: Host '192.168.0.102' is not allowed to connect to this MySQL server
- 【MySql】报错:1130-host ... is not allowed to connect to this MySql server
- MySQL Error 1130 Host 'localhost' is not allowed to connect to this MySQL server
- 手把手教你ARC——ARC入门和使用
- 9 款风格华丽的 jQuery/CSS3 插件推荐
- libevent源码分析---基本使用场景和事件流程
- 【转】根据王小云教授的算法写的MD5碰撞的程序[c源代码]
- OpenWRT 修改LuCI:语言、主题
- 1130-host ... is not allowed to connect to this MySql server
- down_file.jsp 文件下载页面
- uboot官方网站
- 每次VS2010启动出现的问题
- 第四百三十五章 灭龙魔宫
- 第二章 基础知识之#,##以及...的用法
- android布局属性之margin
- 什么是堆
- IOS 启动画面和图标设置(适配IOS7 and Xcode5)