{"record":{"id":"756e4c9fa4bdb29c","repo":"apache/seatunnel","slug":"database-configuration-option-is-set-but-is-o","errorCode":null,"errorMessage":"Database configuration option '{}' is set but is obsolete, please use '{}' instead","messagePattern":"Database configuration option '(.+?)' is set but is obsolete, please use '(.+?)' instead","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java","lineNumber":661,"sourceCode":"            factory =\n                    JdbcConnection.patternBasedFactory(\n                            MySqlConnection.URL_PATTERN,\n                            driverClassName,\n                            getClass().getClassLoader());\n        }\n\n        private static String determineConnectionTimeZone(final Configuration dbConfig) {\n            // Debezium by default expects timezoned data delivered in server timezone\n            String connectionTimeZone = dbConfig.getString(JDBC_PROPERTY_CONNECTION_TIME_ZONE);\n\n            if (connectionTimeZone != null) {\n                return connectionTimeZone;\n            }\n\n            // fall back to legacy property\n            final String serverTimeZone = dbConfig.getString(JDBC_PROPERTY_LEGACY_SERVER_TIME_ZONE);\n            if (serverTimeZone != null) {\n                LOGGER.warn(\n                        \"Database configuration option '{}' is set but is obsolete, please use '{}' instead\",\n                        JDBC_PROPERTY_LEGACY_SERVER_TIME_ZONE,\n                        JDBC_PROPERTY_CONNECTION_TIME_ZONE);\n                connectionTimeZone = serverTimeZone;\n            }\n\n            return connectionTimeZone != null ? connectionTimeZone : \"SERVER\";\n        }\n\n        public JdbcConfiguration config() {\n            return jdbcConfig;\n        }\n\n        public Configuration originalConfig() {\n            return config;\n        }\n\n        public ConnectionFactory factory() {","sourceCodeStart":643,"sourceCodeEnd":679,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java#L643-L679","documentation":"determineConnectionTimeZone resolves the JDBC connectionTimeZone for the MySQL connector. When the modern connectionTimeZone option is not set, it falls back to the obsolete serverTimezone property and warns that the option is deprecated. The fallback value is still applied, so behavior is correct but the config should be migrated.","triggerScenarios":"MySqlConnectionConfiguration construction with a dbConfig that omits connectionTimeZone but sets JDBC_PROPERTY_LEGACY_SERVER_TIME_ZONE (serverTimezone); determineConnectionTimeZone then logs this deprecation warning and uses the legacy value.","commonSituations":"Configs inherited from older Debezium/Flink-CDC setups that used serverTimezone; upgrading MySQL Connector/J from 8.0.23- to newer versions where serverTimezone was replaced by connectionTimeZone; template configs still carrying serverTimezone.","solutions":["Rename the option: replace serverTimezone with connectionTimeZone in the JDBC properties.","Set the value to the MySQL server's actual time zone (e.g. 'UTC', 'Asia/Shanghai').","Remove the legacy serverTimezone entry to silence the warning.","Re-run the job and confirm timestamp columns convert as expected."],"exampleFix":"// before\ndatabase.serverTimezone = UTC\n// after\ndatabase.connectionTimeZone = UTC","handlingStrategy":"validation","validationCode":"// migrate legacy option before submission\nif (props.containsKey(\"database.serverTimezone\") && !props.containsKey(\"database.connectionTimeZone\")) {\n    props.put(\"database.connectionTimeZone\", props.remove(\"database.serverTimezone\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use connectionTimeZone in all new MySQL CDC configs.","Grep config repos for serverTimezone during upgrades and migrate them.","Document the timezone the MySQL server runs in and pin it explicitly."],"tags":["mysql","cdc","jdbc","timezone","deprecated-config"],"backgroundTag":"deprecated-api-usage","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}