When trying to connect to MySQL via JDBC I’m getting timezone error, I think I know how to solve it but I’ve to set properties to the JDBC connection but I dont know how to do it in Base… any other ideas?
The message is something like this “The server time zone value’GMT Summer Time’ is not recognised or represents more than one timezone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support.”
Hello,
First, the test used a JDBC connector from MySQL - mysql-connector-java-5.1.42-bin.jar.
Here is a typical connection in Base using this (local server - remote would be different address):
Based on the info on this post → How to change mysql timezone in java connection
then added ?useLegacyDatetimeCode=false
to the end of Datasource URL
. Note, local time for server is PDT.
This resulted in a similar error to the one you received. Then, again based on the linked post, added to the end of last addition &serverTimezone=America/New_York
and all worked OK. So the total additional info added was :
?useLegacyDatetimeCode=false&serverTimezone=America/New_York
If this answers your question please tick the (upper left area of answer). It helps others to know there was an accepted answer.
I also was having the exact same problem and the above answer almost worked but then it would replace the “Name of the MySQL database” with nothing but “New_York”. (“New_York” is not my time zone anyhow") I also tried quotes around the whole string and various parts but to no avail so I gave up on trying to use a “Country/State” combo and just specified a non ‘daylight savings time zone’.
I tried without the “&serverTimezone=MST” but that failed as well.
I also tried “&serverTimezone=MDT” and that failed, so for some reason, it doesn’t like daylight savings time!
@G O R D The question/answer above deals with a JDBC connector. Looks like yours is using an ODBC connector. Connectors will react differently.
If you have a problem with it, ask as a new question.
That must be the one included in Base. Notice in the answer the version tested was 5.1.4x from MySQL. You may want to try that found here → Connector/J 5.1.46
Thanks Ratslinger. Yes, it is the JDBC connector included in LO Base. I’ll download and try the link you provided and see if LO Base finds and uses it or not.