3119
MySQLERRORNotableReplicationHIGH confidence

Statement-based binlog mode cannot be used without replicated tables

Production Risk

High — replication may stop or produce inconsistent data on replicas.

What this means

A statement in STATEMENT binlog format modifies a table that is filtered out from replication (e.g., via replicate-ignore-table), making it impossible to log correctly.

Why it happens
  1. 1DML on a table excluded by replicate-ignore-table or replicate-wild-ignore-table while using STATEMENT binlog format.
  2. 2The statement cannot be reliably replicated because the table does not exist on the replica.
How to reproduce
trigger — this will error
trigger — this will error
INSERT INTO ignored_table VALUES (1);  -- when table is in replicate-ignore-table list

expected output

ERROR 3119 (HY000): Statement cannot be logged to the binary log in statement format, as statement is not safe on replicas.

Fix 1

Switch to ROW binlog format

Switch to ROW binlog format
SET GLOBAL binlog_format = 'ROW';

Why this works

ROW format logs individual row changes, which can be safely filtered on the replica.

Fix 2

Remove the table from the replication filter if it should be replicated

Remove the table from the replication filter if it should be replicated
-- Review CHANGE REPLICATION FILTER REPLICATE_IGNORE_TABLE=();

Why this works

Ensures the table is replicated consistently.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3119 ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES2

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors