server timezone error is unrecognized wildfly 14 Connector / J 8.0.13

0

I'm setting up my environment using wildfly 14.0.1.Final and the connector mysql-connector-java-8.0.13.

I have the following error when configuring the connection profile and I make a connection test:

  

java.sql.SQLException: The server time zone value 'Brazilian summer time' 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 use time zone support.

My datasource in the standalone.xml file:

<datasource jndi-name="java:jboss/datasources/MySQL-DS" pool-name="MySQL" enabled="true" use-java-context="true">
  <connection-url>jdbc:mysql://localhost:3306/pegasus?useTimezone=true&amp;serverTimezone=Brazil/East</connection-url>
  <driver>mysql</driver>
  <security>
    <user-name>pegasus_admin</user-name>
      <password>pegasus_admin</password>
  </security>
</datasource>
    
asked by anonymous 11.11.2018 / 01:47

1 answer

0

MySQL, when it does not have a default timezone, tries to get Windows timezone, but this timezone is in a format that it does not recognize.

Correcting for the problem, set the server's global time_zone variable.

SET @@global.time_zone = '+3:00';
    
11.11.2018 / 02:02