解决mysql java.sql.SQLException: The server time zone value‘XXXXXX' is unrecognized or represents...
2016-08-09 14:58
633 查看
解决java.sql.SQLException: The server time zone value ‘XXXXXX’ is unrecognized or represents more than one time zone.
1.报错截图
使用的数据库是MySQL,驱动是6.0.3,这是由于数据库和系统时区差异所造成的,在jdbc连接的url后面加上serverTimezone=GMT即可解决问题,如果需要使用gmt+8时区,需要写成GMT%2B8,否则会被解析为空。再一个解决办法就是使用低版本的MySQL jdbc驱动,5.1.28不会存在时区的问题。
相关文章推荐
- 解决mysql java.sql.SQLException: The server time zone value‘XXXXXX' is unrecognized or represents...
- 解决mysql java.sql.SQLException: The server time zone value‘XXXXXX' is unrecognized or represents...
- 解决mysql java.sql.SQLException: The server time zone value‘XXXXXX' is unrecognized or represents...
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more tha
- 异常: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 tha
- 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.
- mysql连接异常:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zo
- The server timezone value 'UTC' is unrecognized or represents more than one timezone
- Mysql错误: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 timezone value 'xxx' is unrecognized or represents more than one time
- The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone
- The server time zone value 'EDT' is unrecognized or represents more than one time zone.
- 连接MySQL时区bug: 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
- jdbc连接数据库 The server time zone value '�й���ʱ��' is unrecognized or represents more... 错误