mysql-connector-java-6.0.4.jar 异常

来源:互联网 发布:网页编程入门 编辑:程序博客网 时间:2024/06/15 22:35

这里是ecilpse的错误提示Tue Sep 19 23:08:26 CST 2017 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.

千万千万要看错误提示啊。。。。花了好久,才发现这里有说

按里面说的ssl的使用要在url里面设置,另外的博客说时区也用,就都加进去吧

旧的版本url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8

其中test是我的数据库

新版本url=jdbc:mysql:///test?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false

或者or set useSSL=true and provide truststore for server certificate verification.

笔者一个蒟蒻差点死在学习开发的路上。。。。

阅读全文
0 0
原创粉丝点击