The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You mu
来源:互联网 发布:c语言主函数 编辑:程序博客网 时间:2024/06/05 19:32
spring+springMVC+mybatis+mysql启动时,总报错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.
TNN的怎么都查不出原因,后来发现是mysql-connector-java的一个bug: http://bugs.mysql.com/bug.php?id=79343,CNM差点搞死了
[com.alibaba.druid.pool.DruidDataSource]create connection error, url: jdbc:mysql://localhost:3308/mdl?characterEncoding=UTF-8, errorCode 0, state 01S00java.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:545) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:505) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:479) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:489) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:69) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1606) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:633) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:347) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:219) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:148) at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:220) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:142) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1466) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1529) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2109)Caused by: com.mysql.cj.core.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.GeneratedConstructorAccessor10.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:54) at com.mysql.cj.core.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73) at com.mysql.cj.jdbc.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:118) at com.mysql.cj.mysqla.MysqlaSession.configureTimezone(MysqlaSession.java:293) at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:2399) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:1739) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:1596) ... 9 more
改前:jdbc_url=jdbc:mysql://localhost:3308/mdl?characterEncoding=UTF-8改后:jdbc_url=jdbc:mysql://localhost:3308/mdl?characterEncoding=utf8&useUnicode=true&sessionVariables=storage_engine%3DInnoDB&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
参考:https://confluence.atlassian.com/bitbucketserverkb/database-migration-to-mysql-fails-java-sql-sqlexception-the-server-time-zone-value-cdt-is-unrecognized-or-represents-more-than-one-time-zone-847457613.html
阅读全文
2 0
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You mu
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You mu
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You m
- bug: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
- 数据库连接 The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
- 连接数据库:ERROR: The server time zone value '�й�' is unrecognized or represents more than one time zone
- mysql连接异常:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zo
- The server time zone value 'EDT' is unrecognized or represents more than one time zone.
- Mysql错误:The server time zone value is unrecognized or represents more than one time zone
- The server time zone value 'PDT' is unrecognized or represents more than one time zone
- 连接MySQL时区bug: The server time zone value '�й���ʱ��' is unrecognized or represents more
- jdbc连接数据库 The server time zone value '�й���ʱ��' is unrecognized or represents more... 错误
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more tha
- mysql出现错误:The server time zone value is unrecognized or represents more than one time zone
- 异常:java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more
- java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more
- The server time zone value '?泄???????' is unrecognized or represents more t
- es5中‘==’与‘===’算法的实现
- SpringBoot系列之一介绍及Helloworld
- MySQL5.6 运用临时表做SQL优化
- 关于JAVA中URI和URL的区别的理解
- Android APP的沉浸式体验
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You mu
- OpenSSL 把cer证书链以及key文件生成keystore,tomcat https配置
- java的真实学习经验!
- C函数及使用例子
- RTP协议全解析(H264码流和PS流)
- document cookie用法
- 正则表达式
- liunx中ls -la
- 关于Recycleview返回多个item布局