博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MySQL问题
阅读量:7090 次
发布时间:2019-06-28

本文共 3430 字,大约阅读时间需要 11 分钟。

mysql连接报错

Thu Aug 09 20:20:40 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 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.java.sql.SQLException: The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76)    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832)    at com.mysql.cj.jdbc.ConnectionImpl.
(ConnectionImpl.java:456) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.runoob.test.MySQLDemo.main(MySQLDemo.java:26)Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85) at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:128) at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2236) at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2260) at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1314) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:963) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) ... 6 more

 

static final String DB_URL = "jdbc:mysql://127.0.0.1:3306/testdb1?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false";

转载于:https://www.cnblogs.com/xy123001/p/9451556.html

你可能感兴趣的文章
POJ 3074 Sudoku(算竞进阶习题)
查看>>
Maven下载cxf所需要的jar包
查看>>
【转】Jmeter学习 笔记——测试计划元件
查看>>
xfce4 启用回收站
查看>>
JMeter性能测试入门篇,超详细
查看>>
Use custom widgets with Qt Designer: Promotion technique
查看>>
点滴积累【JS】---JS小功能(onmousedown实现鼠标拖拽div移动)
查看>>
BinaryReader 、BinaryWriter是方便用二进制方式读写int,double,string之类的数据
查看>>
(转)Linux下运行python
查看>>
【转】解决weblogic启动慢和创建域慢的方法
查看>>
信息安全基础第一周作业
查看>>
GET和POST区别
查看>>
MySql 数据库系列问题
查看>>
BFC是什么?有什么作用?
查看>>
010.简单查询、分组统计查询、多表连接查询(sql实例)
查看>>
3_Windows下利用批处理文件_去除C源代码中指示行号的前导数字
查看>>
Bzoj 1853: [Scoi2010]幸运数字 容斥原理,深搜
查看>>
Hdu 4311-Meeting point-1 曼哈顿距离,前缀和
查看>>
docker网络介绍之bridge网络详解
查看>>
两个PHP方面的东西,超过2038的时间和唯一订单号算法
查看>>