为了账号安全,请及时绑定邮箱和手机立即绑定

连接MySQL,eclipse运行以后出现这个怎么解决

Thu Aug 11 15:07:20 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

小溪,22

正在回答

1 回答

造成这个问题的原因是你用的Mysql版本过高,mysql在高版本中增加了数据加密技术,也就是SSL协议,在用户通过第三方软件连接时需要对连接信息进行SSL转换加密,而你提供的地址如果没有申明SSL转换,就会导致新版mysql无法识别,相当于你提供了错误的地址。解决方法是在url后面加上SSL申明useSSL=true。比如我这样:"jdbc:mysql://localhost:3306/zx?useUnicode=true&useSSL=true"

1 回复 有任何疑惑可以回复我~
#1

SilenceDean 提问者

谢谢,解决了
2016-08-11 回复 有任何疑惑可以回复我~
#2

小鑫爷

可不可以通过更改MySQL的配置进行解决?或者还有其他办法?
2017-05-19 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

连接MySQL,eclipse运行以后出现这个怎么解决

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信