The Java MySQL JDBC driver sometimes has issues connecting to the MySQL database depending on the MySQL timezone setting. Java Exceptions like the following are an indication for this issue:
java.sql.SQLException: The server time zone value 'Coordinated Universal 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 utilize time zone support.
To fix the issue it is recommended to change the MySQL timezone setting by executing the following MySQL statement
SET GLOBAL time_zone = 'UTC' ;
To be sure you do not lose this information, e.g. on reboot, you can set a time zone in the MYSQL my.cnf or my.ini file
[mysqld] default-time-zone=+00:00 explicit_defaults_for_timestamp=1
If that is not sufficient, follow the instructions underĀ My SQL Time Zone Issues
Comments
0 comments
Please sign in to leave a comment.