Re: How do I set the timezone in MYSQL 8.0.12 or configure the JDBC driver??
Posted by: Filipe Silva
Date: December 17, 2018 01:48PM

Hi Karen,

Is this still a problem? It seems from your other post that you had figured out what to do with regard to the timezone issue.

Anyway. The connection string you pasted here should have worked.

Quick explanation: the time zone in server (`show variables like 'time_zone';`) is almost certainly SYSTEM, which refers to the operating system time zone. Being a Windows machine, these time zones don't come with a standard IANA time zone name, as such, the driver (Connector/J) has to try to figure it out from a static mapping. In your case "Malay Peninsula Standard Time" doesn't exist in this mapping, so the connection fails. The two options you have to workaround this are:
- Set "serverTimezone=<your_time_zone_here>" in the connection string, which you are doing, so it should work already.
- Set MySQL server variable `time_zone` with a known value. For example: `SET GLOBAL time_zone='Asia/Kuala_Lumpur';` (or, preferably, set it in your my.cnf file).

Let me know if you still need help with this.

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I set the timezone in MYSQL 8.0.12 or configure the JDBC driver??
December 17, 2018 01:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.