WARN: Establishing SSL connection without server's identity verification is not recommended
0.要想用Java连接mysql数据库,首先装好JDK,配置好环境变量,将jdk*.*.*\lib放入classpath,将jdk*.*.*\bin放入path中(*.*.*表示版本号);其次安装好mysql数据库,然后下载连接数据库要用的驱动包,并配置环境变量(配置方法,将驱动包的路径放入classpath中)。
1.Java使用mysql-jdbc连接MySQL出现如下警告:
Establishing SSL connection without server's identityverification 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 optionisn't set. For compliance with existing applications not using SSL theverifyServerCertificate property is set to 'false'. You need either toexplicitly disable SSL by setting useSSL=false, or set useSSL=true and providetruststore for server certificate verification.
原因是MySQL在高版本需要指明是否进行SSL连接。解决方案如下:
在mysql连接字符串url中加入ssl=true或者false即可,如下所示。
url=jdbc:mysql://127.0.0.1:3306/framework?characterEncoding=utf8&useSSL=true
2.对于错误:
要在url中加入serverTimezone=America/New_York,如下所示:
publicstatic final StringDBURL="jdbc:mysql://localhost:3306/d1?useSSL=true&useLegacyDatetimeCode=false&serverTimezone=America/New_York";
(解决网址:http://stackoverflow.com/questions/7605953/how-to-change-mysql-timezone-in-java-connection)
WARN: Establishing SSL connection without server's identity verification is not recommended的更多相关文章
- MySQL 警告WARN: Establishing SSL connection without server's identity verification is not recommended.解决办法
Fri Jun 17 13:46:54 CST 2016 WARN: Establishing SSL connection without server's identity verificatio ...
- 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 i
jdbc连接数据库候,对数据进行访问,访问正常当出现如下警告: WARN: Establishing SSL connection without server's identity verifica ...
- C3P0 WARN: Establishing SSL connection without server's identity verification is not recommended
c3p0的出现,是为了大大提高应用程序和数据库之间访问效率的. 它的特性: 编码的简单易用 连接的复用 连接的管理 今天在配置C3p0的时候出现了这个warn 原因是因为要验证SSL Wed Se ...
- Wed Sep 19 20:48:46 CST 2018 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 mus
Wed Sep 19 20:48:46 CST 2018 WARN: Establishing SSL connection without server's identity verificatio ...
- SpringBoot+mybatis:报错Fri Oct 19 14:29:24 CST 2018 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+ requiremen
报错:Fri Oct 19 14:29:24 CST 2018 WARN: Establishing SSL connection without server's identity verifica ...
- Java连接MySQL报出警告 WARN: Establishing SSL connection without server's identity verification is not recommended.
很多人使用JDBC连接MySQL时报出警告: WARN: Establishing SSL connection without server's identity verification is n ...
- 【警告】WARN: Establishing SSL connection without server's identity verification is not recommended.
1.Java访问Mysql时出现如下警告: 2019-04-02 10:30:50.545 INFO 1290 --- [nio-8080-exec-1] com.zaxxer.hikari.Hika ...
- Wed Jul 04 18:01:38 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended
Wed Jul 04 18:01:38 CST 2018 WARN: Establishing SSL connection without server's identity verificatio ...
- 使用Mybatis连接到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 esta
在Eclipse中使用springboot整合Mybatis,连接到5.7版本Mysql报错WARN: Establishing SSL connection without server's ide ...
- MYSQL:WARN: Establishing SSL connection without server's identity verification is not recommended.
WARN: Establishing SSL connection without server's identity verification is not recommended. Accordi ...
随机推荐
- IP网际协议 - IP首部,IP路由选择,子网掩码
IP首部 4个字节的32 bit值以下面的次序传输:首先是0-7 bit,其次8-15 bit,然后1 6-23 bit,最后是24~31 bit.这种传输次序称作big endian字节序.由于T ...
- obj-c中SEL签名和Invocation示例
参考小示例,代码如下: #import <Foundation/Foundation.h> @interface PlayList:NSObject @property NSMutable ...
- SharePoint 部件通过EditorPart自定义属性面板
需求:编写一个新闻展示的WebPart,要求可以分类,类别是从WebService中获取的字符串,要求可以在属性中勾选分类,显示该分类的信息,分类可能会增加.我要做的就是动态生成属性中的新闻类别,至于 ...
- C# /VB.NET 插入、修改、删除Word批注
批注内容可以是对某段文字或内容的注释,也可以是对文段中心思想的概括提要,或者是对文章内容的评判.疑问,以及在阅读时给自己或他人起到提示作用.本篇文章中将介绍如何在C#中操作Word批注,主要包含以下要 ...
- IOS Dev 需要常看的网站<转>
英文系列 网站 http://Raywenderlich.com 这个不多说了吧,iOS界的百科全书.iOS By tutorial系列书从iOS7到8全买的正版别说499刀了,999刀也入手. ob ...
- 《C++标准程序库》学习笔记(一)C++相关特性
抱着本厚厚的<C++标准库>读了几天,想想也该写点关于用法的总结,一来怕今后容易忘记,二来将书上的事例重新敲一遍,巩固对程序库相关知识的了解.今天开第一篇,以后不固定更新.当然,笔者所读为 ...
- eclipse乱码
eclipse乱码:Windows >general >Workspace UTF-8Windows >general >Editors >Text Editors &g ...
- 网易面经(Java开发岗)
网易面经(Java岗) 网易两面面经整理 岗位:我投递的是杭研所的Java开发岗位.行程:半天的时间南京=杭州之间穿行,单程2个小时,从杭州东站=网易大厦,单程1个小时(如果能买到城站高铁动车票可以从 ...
- Python杂记
一.函数 1.numpy 模块中的nonzero函数 nonzero返回的数非零元素的下标. 如果输入是单维度的时候它的返回值只有一个:如果输入是多个维度的话,那么它的返回值也是多个维度的.并且的它的 ...
- JS跨域:2.解决方案之-设置回调参数
一 服务器端代码 package com.cn; import java.util.List; import javax.servlet.http.HttpServletRequest; import ...