apache/seatunnel · error · DebeziumException
Unexpected error while connecting to MySQL and looking at BI
Error message
Unexpected error while connecting to MySQL and looking at BINLOG_FORMAT mode:
What it means
isBinlogFormatRow checks that binlog_format is ROW via SHOW GLOBAL VARIABLES and wraps any SQLException into this DebeziumException. The check ensures the binlog carries row-based events needed for CDC; the exception means the variable lookup itself failed at the SQL level.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java:456
}
}
/**
* Determine whether the MySQL server has the row-level binlog enabled.
*
* @return {@code true} if the server's {@code binlog_format} is set to {@code ROW}, or {@code
* false} otherwise
*/
protected boolean isBinlogFormatRow() {
try {
final String mode =
queryAndMap(
"SHOW GLOBAL VARIABLES LIKE 'binlog_format'",
rs -> rs.next() ? rs.getString(2) : "");
LOGGER.debug("binlog_format={}", mode);
return "ROW".equalsIgnoreCase(mode);
} catch (SQLException e) {
throw new DebeziumException(
"Unexpected error while connecting to MySQL and looking at BINLOG_FORMAT mode: ",
e);
}
}
/**
* Query the database server to get the list of the binlog files availble.
*
* @return list of the binlog files
*/
public List<String> availableBinlogFiles() {
List<String> logNames = new ArrayList<>();
try {
LOGGER.info("Get all known binlogs from MySQL");
query(
"SHOW BINARY LOGS",
rs -> {
while (rs.next()) {View on GitHub (pinned to cf67b549a7)
Solutions
- Verify MySQL connectivity and credentials
- Grant the CDC user permission to run SHOW GLOBAL VARIABLES
- Inspect the cause SQLException and MySQL server logs
- Ensure binlog_format=ROW on the server so replication works once connected
Example fix
// before SET GLOBAL binlog_format = 'STATEMENT'; // after SET GLOBAL binlog_format = 'ROW';
Defensive patterns
Strategy: retry
Validate before calling
try (Statement s = conn.createStatement()) { ResultSet rs = s.executeQuery("SHOW GLOBAL VARIABLES LIKE 'binlog_format'"); rs.next(); if (!"ROW".equals(rs.getString(2))) { throw new IllegalStateException("binlog_format must be ROW"); } } Try / catch
catch (DebeziumException e) { logger.error("binlog_format check failed", e.getCause()); retryWithBackoff(); } Prevention
- Set binlog_format=ROW persistently in my.cnf
- Grant SHOW GLOBAL VARIABLES access to the CDC user
- Validate DB reachability before connector startup
- Re-check settings after MySQL upgrades/restarts
When it happens
Trigger: SQLException while executing the binlog_format query inside isBinlogFormatRow — connection failure, insufficient privileges, or server rejecting the statement.
Common situations: Connector startup against an unreachable or restarting MySQL; CDC user restricted from SHOW GLOBAL VARIABLES; transient network/TLS failures.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- Unexpected error while connecting to MySQL and looking for b
- Unexpected error while connecting to MySQL and looking at BI
- Error reading MySQL variables:
- Unexpected error while connecting to MySQL and looking at GT
- Unexpected error while connecting to MySQL and looking at gt
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/1c45831ae9cbc3ba.
Report an issue: GitHub.