Error 3114 appears when a GTID-enabled server encounters an anonymous transaction and replication halts.
MySQL error 3114 ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON means a GTID-enabled server received or generated an anonymous transaction. Align all servers to GTID_MODE = ON or ON_PERMISSIVE, remove anonymous events, and restart replication to fix the issue.
ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON
MySQL raises error 3114 when a server running with @@GLOBAL.GTID_MODE = ON attempts to process a transaction that lacks a Global Transaction Identifier (GTID). Replication halts because GTID-based replication demands that every transaction carry a unique GTID.
The error surfaces during writes on a primary if a client sets gtid_next = ANONYMOUS, or on a replica when it receives an anonymous event from an upstream server that is not fully GTID compliant.
Mixed topologies in which some servers run GTID_MODE = ON while others still emit anonymous transactions generate this failure. Upgrades from MySQL 5.6 to 5.7+ often leave replicas in GTID mode while primaries remain legacy.
Manual commands such as SET SESSION gtid_next = 'ANONYMOUS' before DDL, poorly written migration scripts, or third-party tools that bypass GTID logic also insert anonymous events, leading to the error at commit time.
First, confirm GTID settings across all nodes: SELECT @@GLOBAL.gtid_mode; Ensure every server shows ON or ON_PERMISSIVE, then restart replication. If the primary is still OFF, enable GTID or switch replicas to OFF before realignment.
When the error blocks a replica mid-stream, skip or assign a fake GTID to the transaction with SET GLOBAL gtid_purged, or use mysqlbinlog to inject the missing GTID, then START SLAVE; to resume.
During version upgrades, set gtid_mode = OFF_PERMISSIVE on new replicas so they accept both GTID and anonymous events while the cluster transitions. After all primaries support GTID, flip to ON everywhere.
For maintenance scripts, remove explicit gtid_next statements or wrap them with SET gtid_next = 'AUTOMATIC'; to ensure GTID compliance.
Enable enforce_gtid_consistency to block statements that cannot be safely logged with GTIDs. Monitor the performance_schema table replication_applier_status_by_worker for anonymous events.
Use an IDE like Galaxy that highlights session variables and warns if gtid_next is set to ANONYMOUS, preventing accidental commits that would break GTID replication.
Error 1846 ER_GTID_NEXT_TYPE_UNSUPPORTED warns when gtid_next is incompatible with the current gtid_mode. Align the modes to resolve.
Error 3671 ER_GTID_MODE_REQUIRES_BINLOG warns that GTID mode requires binary logging. Enable log_bin to continue.
A replica in GTID mode receives anonymous events from an upstream primary still in non-GTID mode.
Developers set gtid_next = ANONYMOUS for DDL or bulk loads, producing transactions without GTIDs.
Only some nodes were upgraded to 5.7+ with GTID_MODE = ON while others remained legacy, creating configuration drift.
Backup or migration utilities that disable GTID logging inject anonymous statements into the binary log.
Appears when gtid_next type conflicts with current gtid_mode. Align modes or reset gtid_next to AUTOMATIC.
Raised when enabling GTID mode without binary logging. Activate log_bin to proceed.
Replication fails because binary log files are missing. Verify log retention and file paths.
You can set gtid_mode = OFF_PERMISSIVE temporarily, but align all servers to GTID = ON as soon as possible to maintain consistency.
Usually not. Injecting or skipping the offending transaction and realigning GTID settings is enough.
It blocks only statements that cannot be safely logged with GTIDs, such as CREATE TEMPORARY TABLE outside transactions.
Galaxy’s SQL editor flags session changes like gtid_next = ANONYMOUS and offers AI suggestions to enforce GTID compliance before queries run.