The replica refuses to apply an anonymous (non-GTID) transaction while GTID auto positioning is active.
MySQL error 3113 ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION occurs when a replica running AUTO_POSITION=1 receives a transaction that lacks a GTID. Convert all sources to GTID, disable AUTO_POSITION, or skip the event to restore replication.
ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION
MySQL raises error 3113 when a replica configured with CHANGE MASTER AUTO_POSITION=1 encounters an anonymous transaction that lacks a Global Transaction Identifier. The replica halts to protect GTID consistency.
The issue appears in hybrid environments where some servers or logical imports still generate non-GTID events. Because the replica cannot map the anonymous event to a GTID sequence, it refuses to continue until you intervene.
GTID replication requires every transaction to have a unique GTID. Anonymous events come from servers with gtid_mode disabled, backups produced without GTID metadata, or certain statements executed with GTID_NEXT set incorrectly.
Upgrades from versions prior to MySQL 5.6, mixed statement and row-based logging, or manual imports using mysqlbinlog without the set-gtid-purged option often trigger the problem.
First confirm the stop point by running SHOW SLAVE STATUS. Then choose an approach: inject a fake GTID, convert the primary to GTID, or temporarily disable AUTO_POSITION.
-- Inject a placeholder GTID then resume
STOP SLAVE;
SET GTID_NEXT='00020321-1111-1111-1111-111111111111:1';
BEGIN; COMMIT;
SET GTID_NEXT='AUTOMATIC';
START SLAVE;
If you control the source, switch gtid_mode=ON and enforce_gtid_consistency=ON, take a fresh dump with --set-gtid-purged=ON, and rebuild the replica with AUTO_POSITION again.
Logical dump without GTIDs - Re-export with mysqldump --set-gtid-purged=ON and restore on the replica.
Single legacy instance in a cluster - Enable GTIDs on that server, wait for all transactions to replicate, then turn AUTO_POSITION back on.
Keep gtid_mode and enforce_gtid_consistency enabled on every server from installation forward. Always produce backups with GTID information preserved.
Monitor Last_IO_Error in SHOW SLAVE STATUS or via Galaxy alerts so replication stops are detected quickly and fixed before lag grows.
Error 1236: Slave could not find binlog file - usually fixed by re-syncing the replica after ensuring the source retains logs.
Error 3102: ER_GTID_NEXT_TYPE_UNDEFINED_GROUP - indicates GTID_NEXT misuse; reset GTID_NEXT to AUTOMATIC after custom injection.
The source writes anonymous events because GTID support is disabled.
mysqldump defaults to removing GTIDs unless --set-gtid-purged is specified.
Older MySQL instances or MariaDB nodes may still emit anonymous events.
Running SET GTID_NEXT to UUID with no subsequent automatic reset can create anonymous commits.
Appears when binlog files have been purged on the source. Re-sync the replica.
Raised when GTID_NEXT remains undefined after manual changes. Reset GTID_NEXT to AUTOMATIC.
Indicates corrupted relay log files, often following forced skips. Recreate relay logs.
Skipping is safe only for noncritical data such as test inserts. Production data should be re-generated with a valid GTID.
You can revert to file-based replication, but you lose GTID benefits like automatic failover. It is better to convert every server to GTID.
Query performance_schema by checking the variable gtid_mode on every node or run SELECT @@GLOBAL.gtid_mode.
Galaxy highlights replication errors in real time, lets you share fix scripts with teammates, and keeps a versioned history of the change.