zoukankan      html  css  js  c++  java
  • MySQL关于useSSL的问题,会弹出警告

    我在手动配置dbcp时,执行数据库相关的操作时,报错以下:

    Fri Aug 28 21:10:19 CST 2020 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.
    

    网上的解决办法是设置useSSL,显然我设置了我在配置文件中设置了这个,但是依然报错,原本的配置文件如下:
    dbcpconfig.properties的部分内容如下:

    #连接设置
    driverClassName=com.mysql.jdbc.Driver
    url=jdbc:mysql://localhost:3306/jdbcStudy?
    useUnicode=true&characterEncoding=utf8&useSSL=true
    

    后来我改变了一下useSSL的位置。这样就没有报出异常警告了,改变后的配置如下,将useSSL放到url中。

    driverClassName=com.mysql.jdbc.Driver
    url=jdbc:mysql://localhost:3306/jdbcStudy?useSSL=true
    useUnicode=true&characterEncoding=utf8
    
    保持对优秀的热情
  • 相关阅读:
    Chapter 12 homework
    copy construction note
    Chapter 11 homework
    数组排序最大元素
    temporary Object and destructor
    strcpy() 函数注意的地方
    结对项目第二次作业
    结队项目——第一次作业
    软件工程实践2017第二次作业
    软件工程实践2017第一次作业
  • 原文地址:https://www.cnblogs.com/luckforefforts/p/13642691.html
Copyright © 2011-2022 走看看