首页 > 代码库 > java运行jdk连接mysql出现了:Establishing SSL connection without server's identity verification is not recommended
java运行jdk连接mysql出现了:Establishing SSL connection without server's identity verification is not recommended
注意:出现这类提示也不会影响对数据库的增删改查操作,所以不用紧张。。
在运行练习时出现下面的错误信息提示:
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.
翻译过来就是:不建议不使用服务器身份验证建立SSL连接,必须默认建立SSL连接。
解决方案:在jdbc:mysql://localhost/table后面拼接?autoReconnect=true&useSSL=false
效果:
jdbc:mysql://localhost/table?autoReconnect=true&useSSL=false
然后重新运行一下,没有出现这类提示了。
java运行jdk连接mysql出现了:Establishing SSL connection without server's identity verification is not recommended
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。