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

  1. Reconnect/verify MySQL connectivity and credentials
  2. Grant privileges to run SHOW GLOBAL VARIABLES
  3. Check the cause SQLException for the root error
  4. 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

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


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/7fe6ba936d048ce8. Report an issue: GitHub.