SQLException: The server time zone value '�й���ʱ��' is unrecognized
来源:互联网 发布:mysql的存储过程 编辑:程序博客网 时间:2024/06/03 21:14
在使用spring boot操作数据库的时候,莫名其妙抛了一个错误:
ERROR o.a.tomcat.jdbc.pool.ConnectionPool - Unable to create initial connections of pool.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.
这个错误是因为mysql连接的依赖包是高版本的情况下:
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>6.0.6</version></dependency>
在配置datasource.url时不能简单的这样配:
spring.datasource.url=jdbc:mysql://localhost:3306/chat
需要加上一些必要的后缀信息(改成下面的配置就可以了):
spring.datasource.url=jdbc:mysql://localhost:3306/chat?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
阅读全文
4 0
- SQLException: The server time zone value '�й���ʱ��' is unrecognized
- SQLException: The server time zone value ‘�й���ʱ��’ is unrecognized
- SQLException: The server time zone value ‘�й���ʱ��’ is unrecognized
- SQLException: The server time zone value '�й���ʱ��' is unrecognized
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more tha
- 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. 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
- 数据库连接 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
- 连接MySQL时区bug: The server time zone value '�й���ʱ��' is unrecognized or represents more
- jdbc连接数据库 The server time zone value '�й���ʱ��' is unrecognized or represents more... 错误
- shiro连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognize...解决
- 异常: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
- HDU4414 Finding crosses(AC)
- RabbitMQ第二篇:java简单的实现RabbitMQ
- Go语言实现一键多值的Map
- NodeIO_readFile&readFileSync
- IOS程序生命周期
- SQLException: The server time zone value '�й���ʱ��' is unrecognized
- python 和 selenium实现web UI功能自动化测试框架(米兔888)
- 第四题 替换空格
- CentOS 默认防火墙设置
- python小程序-0017
- matplotlib基础——matplotlib.pyplot.scatter
- APP 缓存数据线程安全问题探讨
- POJ1556---The Doors (计算几何基础:判断线段相交(快速排斥实验+跨立实验))
- 白话经典算法系列之三 希尔排序的实现