1130-host ... is not allowed to connect to this MySql server
来源:互联网 发布:c语言 编译 编辑:程序博客网 时间:2024/06/05 10:58
MySQL中可以控制某些IP或者主机才能登陆服务器。类似于在Oracle中sqlnet中设置运行连接的IP范围。一般有两种方法:
- 方法1: 改表法
可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"
mysql -uroot -pvmware
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
- 方法2: 授权法
(1) 用户philip使用使用mysqlpassword作为密码,从任何主机连接到mysql服务器:
GRANT ALL PRIVILEGES ON *.* TO 'philip'@'%' IDENTIFIED BY 'mysqlpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
(2)用户philip使用mysqlpassword作为密码,从ip192.168.110.3的主机连接到mysql服务器:
GRANT ALL PRIVILEGES ON *.* TO 'philip'@'192.168.110.3' IDENTIFIED BY 'mysqlpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
(3)用户philip使用mysqlpassword作为密码,从192.168.110.3的主机连接到mysql服务器的test数据库
GRANT ALL PRIVILEGES ON test.* TO 'philip'@'192.168.110.3' IDENTIFIED BY 'mysqlpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
0 0
- 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
- java三大框架的技术起源
- Android EditText 常用代码块
- 如何创建Cocos2D-X的项目(版本号2.2)
- 如何删除eclipse自动生成的//TODO Auto-generated
- .net程序员转战android第一篇
- 1130-host ... is not allowed to connect to this MySql server
- Java jTextField十六进制输入
- c语言中获取文件长度的一种方法
- 插件化理解
- Android APK反编译详解(附图)
- openfire ofuser 密码加解密
- [数据结构]计数排序
- XMPP 协议工作流程详解
- 常用的字符串函数 strspn strcspn