JDBC连接错误:The server time zone value '��' is unrecognized or represents more than one time zone.
2020-03-06 18:26
1616 查看
出错信息:
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.
错误描述:
服务器时区值“InclutionEnter”被识别或表示多个时区。如果要使用时区支持,则必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性)以使用更具体的时区值。
解决方法:
第一种解决方案
[code] Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/myrount?serverTimezone=UTC", "root", "12345678");
第二种解决方案
在mysql中设置时区,默认为SYSTEM set global time_zone='+8:00'
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- mysql-8.0.11 jdbc连接数据库 The server time zone value ‘�й���ʱ��’ is unrecognized or represents more… 错误
- Mysql错误: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 zone
- ideal连接数据库报错The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time
- mysql连接异常:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zo
- jdbc连接数据库 The server time zone value '�й���ʱ��' is unrecognized or represents more... 错误
- 连接数据库:ERROR: 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.
- Mysql错误:The server time zone value is unrecognized or represents more than one time zone
- SpringBoot: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one ti
- The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You
- The server time zone value ‘?й???’ is unrecognized or represents more than one time zone
- 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.
- 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.
- The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You
- The server timezone value 'UTC' is unrecognized or represents more than one timezone