数据库链接问题,求助?

来源:8-3 DBHelper类设计

贰零一贰

2016-05-15 21:48

Sun May 15 21:43:48 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.

数据库链接正常!

写回答 关注

1回答

  • qq_云在风中_0
    2016-05-28 20:09:31
    已采纳

    原因是MySQL在高版本需要指明是否进行SSL连接。解决方案如下:

    在mysql连接字符串url中加入ssl=true或者false即可,如下所示。

    url=jdbc:mysql://127.0.0.1:3306/shop?characterEncoding=utf8&useSSL=true


    贰零一贰

    非常感谢!

    2016-06-19 18:15:50

    共 1 条回复 >

JAVA遇见HTML——JSP篇

Java Web入门级教程JSP,带你轻松的学习JSP基础知识

248280 学习 · 3071 问题

查看课程

相似问题