无法识别或代表多个时区。如果想利用时区支持,必须配置服务器或JDBC驱动程序(通过“serverTimezone”配置属性)以使用更特殊的时区值。

2022/2/8 14:13:41

本文主要是介绍无法识别或代表多个时区。如果想利用时区支持,必须配置服务器或JDBC驱动程序(通过“serverTimezone”配置属性)以使用更特殊的时区值。,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

错误码:

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的JDBC的url后面加上服务器的时区:serverTimezone=UTC

jdbc:mysql://localhost:3306/demo?serverTimezone=UTC



这篇关于无法识别或代表多个时区。如果想利用时区支持,必须配置服务器或JDBC驱动程序(通过“serverTimezone”配置属性)以使用更特殊的时区值。的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程