(文末有惊喜!懂?)
在使用mysql的6.0.x以上的jar的时候,需要在代码url的链接里面指定serverTimezone。就会出现异常
1.未指定serverTimezone
xml里面配置url
<property name="url" value="jdbc:mysql://localhost:3306/mybatisstudy"/>
出现的异常
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.
您必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性),如果您想要使用时区支持,则需要使用一个更详细的时区值。
在使用mysql的6.0.x以上的jar的时候,需要在代码url的链接里面指定serverTimezone。就会出现异常
1.未指定serverTimezone
xml里面配置url
<property name="url" value="jdbc:mysql://localhost:3306/mybatisstudy"/>
出现的异常
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.
您必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性),如果您想要使用时区支持,则需要使用一个更详细的时区值。












