MySQL connector error "The server time zone value Central European Time"

Martin Klestil :

My problem

MySQL connector "The server time zone value Central European Time" is unrecognized or represents more than one time zone.

The project

Small web Project with: JavaEE, Tomcat 8.5, MySQL, Maven

My attempt

  • Maven -> change MySQL-connector form 6.x to 5.1.39 (no change)
  • Edit context.xml URL change

Connection in context.xml

URL="jdbc: mysql://127.0.0.1:3306/rk_tu_lager?useLegacyDatetimeCode=false;serverTimezone=CEST;useSSL=false;

Error:

Caused by: com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value 'Mitteleurop?ische Sommerzeit' 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.

Martin Klestil :

Thank you Mark Rotteveel and Gord Thompson

I have the connection in an XML file, with & and Europe/Amsterdam finally works.

url="jdbc:mysql://127.0.0.1:3306/rk_tu_lager?useLegacyDatetimeCode=false&serverTimezone=Europe/Amsterdam&useSSL=false"

Thank you, you are great

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=442913&siteId=1