java database connection error: Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value '

1, Resolution:

Error message:

Caused by: com.mysql.cj.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. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:59) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:83) at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:128) at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2201) at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2225) at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1391) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:993) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:852) ... 17 more 

Areas this problem too, the connection portion url JDBC can serverTimezone = UTC plus.
Figure:


Write pictures described here

 

Automated learning.

1, Resolution:

Error message:

Caused by: com.mysql.cj.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. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:59) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:83) at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:128) at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2201) at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2225) at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1391) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:993) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:852) ... 17 more 

Areas this problem too, the connection portion url JDBC can serverTimezone = UTC plus.
Figure:


Write pictures described here

 

Guess you like

Origin www.cnblogs.com/jack-jin/p/12111427.html