zoukankan      html  css  js  c++  java
  • JDBC连接mysql时出现的ssl问题

    使用MySQL数据库时出现如下错误:

    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.

    网上查了查,是当前版本的MySQL要求使用SSL,做出如下修改即可:

    connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/jsp_db","root","123456");

    改成

    connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/jsp_db?useSSL=false","root","123456");

    问题解决。

  • 相关阅读:
    CSpinButtonCtrl控件的使用
    JS基础语法
    JS
    层级,hover
    Html&Css
    定位
    制作静态网页
    查看trunk端口
    配置vlan trunk
    js日期的写法,获取girdviw的行数、提示信息、验证数量信息
  • 原文地址:https://www.cnblogs.com/television/p/8529963.html
Copyright © 2011-2022 走看看