B4J Question MySQL connection problem

besoft

Active Member
Licensed User
Hello,
I have a problem connecting to MySQL server. When I connect, I get the next error.

DATABASE_ connect : com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'CEST' 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.
Interestingly, I can normally connect from other programs like MSAccess, MySqlManager,..

I tried various solutions from the Internet and also different versions of drivers, but without success.

I'm working on B4J 7.00 and JDK1.8.0_160 and mysql-connector-java-8.0.15.jar
Until yesterday, everything was normal.
 

besoft

Active Member
Licensed User
Thanks for the reply,

"jdbc:mysql://localhost/db?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=" + TimeZone.getDefault().getID();
How to use this Timezone parameter in the connction URL strings ? I can not figure out how to write a string with this parameter. Part of what is this parameter?
 

besoft

Active Member
Licensed User
Thanks for the reply,
The connection works (I was done right), but now I get the answer that access is not allowed to the user.
Problems began when we shifted the clock from the winter to the summer time, everything seemed normal before.
If I watch the system time of the server and the time on my computer, they are exactly the same.
In the meantime, I moved the database to another provider, where everything works smoothly.
 
Top