java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server"
java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server":
表示该对象不是远程对象,不能通过该对象远程访问数据
解决:
方案一:改表:
use mysql ;select user,host,password from user;
update user set host = '%' where user='root';
方案二:授权法:
例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
如果你想允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器,并使用mypassword作为密码
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
需要重启mysql数据库。
java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server"的更多相关文章
- Solr java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server
在用solr从mysql导入数据的时候,因为linux和本机的数据库不在同一个ip段上, 又因为本地的mysql没有设置远程其它ip可以访问所以就报了如下错误 解决办法: 在mysql任意可以输入查询 ...
- message from server: "Host 'xxx' is not allowed to connect to this MySQL server的解决
解决方法: 1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" ...
- message from server: "Host 'XXX' is not allowed to connect to this MySQL server
Access denied for user 'root'@'XXXXX' (using password: YES) mysql命令不正确造成: grant all privileges on *. ...
- Cannot create PoolableConnectionFactory (null, message from server: "Host 'admin-PC' is not allowed to connect to this MySQL server")
1.别人在用自己的tomcat访问我留的查询接口时,出现Cannot create PoolableConnectionFactory (null, message from server: &qu ...
- 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server
这段时间在研究火车头的入库教程,在“配置登陆信息和数据库(mysql)”连接中,出现“服务器连接错误Host 'XXX' is not allowed to connect to this MySQL ...
- ERROR 1130: Host xxx is not allowed to connect to this MySQL server
在使用MySQL-Front连接mysql的时候发生的这个错误 ERROR 1130: Host xxx is not allowed to connect to this MySQL server ...
- Host 'xxx' is not allowed to connect to this MySQL server.
mysql开启远程连接 今天在服务器安装了mysql,准备用mysqlguitools远程登录的时候出错,提示:Host 'xxx' is not allowed to connect to this ...
- 连接远程数据库时出现 SSH: expected key exchange group packet from server / 2003 - Can't connect to MySQL server on 'XXX' (10038) / 1130 - Host 'XXX' is not allowed to connect to this MySQL server
昨天在自己的远程服务器上玩,把系统重装了.新装了MySQL,在本地用navicat连接的时候出了几个小问题. 问题一:SSH: expected key exchange group packet f ...
- Mysql 数据库允许远程连接 服务器连接错误 Host 'XXX' is not allowed to connect to this MySQL server
如果连接数据库的时候出现这个问题 Host 'XXX' is not allowed to connect to this MySQL server 说明 Mysql数据库 不允许远程连接, 需要修改 ...
随机推荐
- idea中spring boot启动后无法访问jsp
出自:https://www.jianshu.com/p/470b28d76147 第一种: 打开File > Project Structure > Facetes 如图1: 图1 如果 ...
- ios 获得指定url的cookie
NSArray *myCookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage]cookiesForURL:[NSURL URLWithStrin ...
- CSS选择器学习小结
关于CSS选择器的问题,在实际项目中,以及一般的前端面试中会经常遇到.下面对此做一小结,梳理和巩固相关方面知识.(如有不妥之处,还望大家及时批评指正,以免误导他人) 一.选择器种类 1.id选择器(# ...
- oracle rac 常见安装、管理错误
1. 安装CRS失败,或执行root.sh报错,可能原因: (1) 节点间的时间不同步,解决方法:使用ntp服务 (2) Linux下启用了默认的防火墙,导致执行root.sh报错: Failure ...
- mysql 变量名称不能与表字段一致
my sql的变量名称不能与表字段名称相同不然会有各种异常问题 啃爹
- Spark数据类型SparseMatrix 解释
http://blog.csdn.net/sinat_29508201/article/details/54089771 parseMatrix Spark的mllib包中提供了机器学习的两种基本数据 ...
- Fiddler命令行和HTTP断点调试
fiddler设置断点: fiddler->rules->automatic Breakpoints->选择断点方式,这种方式下设定的断点会对之后的所有HTTP请求有效. 有两个断点 ...
- 发布Maven项目 nexus
1.在pom.xml文件中配置需要发布的工厂 如果想把项目发布到nexus中,需要在pom.xml中配置releases和snapshots版本发布的具体repository <distribu ...
- WIN7系统IIS上发布站点后水印效果失效的解决方法
关于使用一般处理程序给图片添加水印的方法,请参考: 使用一般处理程序(IHttpHandler)制作图片水印 有些时候,给图片添加水印了,在本机运行也都正常,但是发布到IIS上后就没有水印效果了.本人 ...
- xcode - 显示安装过的低版本模拟器
1. 更改版本