Re: How do I set the timezone in MYSQL 8.0.12 or configure the JDBC driver??
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.
Subject
Written By
Posted
December 15, 2018 10:15PM
Re: How do I set the timezone in MYSQL 8.0.12 or configure the JDBC driver??
December 17, 2018 01:48PM
February 12, 2019 11:43PM
February 13, 2019 12:37PM
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.