mysql connector time zone configuration

728 views
Skip to first unread message

ofer

unread,
Oct 20, 2022, 1:35:01 AM10/20/22
to debezium
embedded Debezium, mysql connector. DB server timezone can be any timezone (usually installed with default timezone where its located), client app hosting embedded Debezium.
How do I make sure (through connector configuration) that timezone used by connector/Debezium is same as DB server

using default value (NOT setting database.connectionTimeZone) according to documentation result an error:

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Jerusalem Daylight Time' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'connectionTimeZone' conf
iguration property) to use a more specific time zone value if you want to utilize time zone support.

Once I set .with("database.connectionTimeZone", "") - setting the value as empty string
problem resolved...

Im trying to understand if this is a bug in Debezium or the way to set the connector to adjust timezone according to server


Chris Cranford

unread,
Oct 20, 2022, 8:24:41 AM10/20/22
to debe...@googlegroups.com, ofer
Hi ofer -

Unfortunately this is all part of the interaction between the MySQL driver and the database. The driver used to support the notion of a legacy date/time mode and would do some extra logic on each connection to resolve the database timezone correctly; however, in the 8.x release of the driver, this legacy support was removed and it's expected that anytime the database or the application uses a non GMT/UTC timezone that the driver be specified with the time zone information.  This all dates back to the MySQL bug # 85816 [1].

Hope that helps.
Chris

[1]: https://bugs.mysql.com/bug.php?id=85816
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/4fa8100f-7a65-47f5-85a4-090abeff3ee7n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages