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
    
    保持对优秀的热情
  • 相关阅读:
    Js特殊字符转义之htmlEscape()方法
    利用Image对象,建立Javascript前台错误日志记录
    html5 实现 文件夹上传
    博客园博客开通了
    js 无刷新文件上传 (兼容IE9 )
    js实现关键词高亮显示 正则匹配
    Python练习六
    Python练习二
    Python练习三
    Python练习四
  • 原文地址:https://www.cnblogs.com/luckforefforts/p/13642691.html
Copyright © 2011-2022 走看看