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_ROW_IMAGE mode:
What it means
isBinlogRowImageChecking queries binlog_row_image (SHOW GLOBAL VARIABLES) to confirm it is FULL, and wraps any SQLException into this DebeziumException. Without reading this variable the connector cannot verify that row images contain the before/after data CDC requires.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/io/debezium/connector/mysql/MySqlConnection.java:435
* {@code false} otherwise
*/
protected boolean isBinlogRowImageFull() {
try {
final String rowImage =
queryAndMap(
"SHOW GLOBAL VARIABLES LIKE 'binlog_row_image'",
rs -> {
if (rs.next()) {
return rs.getString(2);
}
// This setting was introduced in MySQL 5.6+ with default of 'FULL'.
// For older versions, assume 'FULL'.
return "FULL";
});
LOGGER.debug("binlog_row_image={}", rowImage);
return "FULL".equalsIgnoreCase(rowImage);
} catch (SQLException e) {
throw new DebeziumException(
"Unexpected error while connecting to MySQL and looking at BINLOG_ROW_IMAGE mode: ",
e);
}
}
/**
* 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);View on GitHub (pinned to cf67b549a7)
Solutions
- Reconnect/verify MySQL connectivity and credentials
- Grant privileges to run SHOW GLOBAL VARIABLES
- Check the cause SQLException for the root error
- Set binlog_row_image=FULL on the server (separate from fixing the query failure)
Example fix
// before SET GLOBAL binlog_row_image = 'MINIMAL'; // after SET GLOBAL binlog_row_image = 'FULL';
Defensive patterns
Strategy: retry
Validate before calling
try (Statement s = conn.createStatement()) { ResultSet rs = s.executeQuery("SHOW GLOBAL VARIABLES LIKE 'binlog_row_image'"); rs.next(); if (!"FULL".equals(rs.getString(2))) { throw new IllegalStateException("binlog_row_image must be FULL"); } } Try / catch
catch (DebeziumException e) { logger.error("binlog_row_image check failed", e.getCause()); retryWithBackoff(); } Prevention
- Set binlog_row_image=FULL in MySQL config (my.cnf, not just runtime)
- Grant global variable read privileges to the CDC user
- Health-check DB connectivity before starting the connector
- Re-verify server settings after failovers
When it happens
Trigger: SQLException while executing the binlog_row_image query inside isBinlogRowImageChecking — lost connection, bad credentials, or statement rejected.
Common situations: Startup validation after a DB restart or failover; user lacking privileges for SHOW GLOBAL VARIABLES; intermittent network problems.
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/7fe6ba936d048ce8.
Report an issue: GitHub.