使用MySQL 最新JDBC驱动包报错The server time zone value is unrecognized or represents
The server time zone value is unrecognized or represents
今天在配置IntelliJ IDEA 2019.1 x64连接到MySQL 5.5.56时,使用了MySQL最新的JDBC驱动8.0.15,在测试连接时报错了。
报错如下:
java.lang.RuntimeException:
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:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(