How to Fix MySQL Error 3911 (ER_UPDATE_GTID_PURGED_WITH_GR)
You get mysql error 3911 when you update the purged GTID set while Group Replication runs. To fix it, stop the Group Replication plugin on the node before you change this value. MySQL uses global transaction identifiers to track every change across a cluster. The server returns symbol ER_UPDATE_GTID_PURGED_WITH_GR with SQLSTATE HY000 when a conflict happens. This rule stops you from breaking transaction history across active cluster nodes. When you know why this block exists, you can plan safe
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You get mysql error 3911 when you update the purged GTID set while Group Replication runs. To fix it, stop the Group Replication plugin on the node before you change this value.
MySQL uses global transaction identifiers to track every change across a cluster. The server returns symbol ER_UPDATE_GTID_PURGED_WITH_GR with SQLSTATE HY000 when a conflict happens. This rule stops you from breaking transaction history across active cluster nodes. When you know why this block exists, you can plan safe updates.
What causes mysql error 3911 in your cluster
The official message states you cannot update GTID_PURGED with the Group Replication plugin running. In a cluster, all nodes must agree on which transactions ran in the past. The purged set lists transactions that the server already removed from its binary logs.
Admins often edit this list when they restore a backup or add a new member. They also change it when they skip a broken transaction during a recovery task. If Group Replication is active, the plugin locks the transaction state to protect the cluster. If one node changes its transaction history alone, the group loses sync right away.
Because of this risk, the database engine blocks any change to the purged set. The block stays in place as long as the replication plugin runs on that node. Even users with full admin rights will hit this error if the plugin is on.
How to diagnose and fix the failure in production
First, check the status of the Group Replication plugin on the target database server. Confirm whether the node is an active member of an online database group. Check the executed transaction set and the purged transaction set on the local node. Compare those sets with the values on the primary node in your cluster.
Before you apply the fix, make sure app traffic does not hit this specific node. Route read and write queries to other healthy members in your database group. Next, stop the Group Replication service on the single node you need to update. You do not need to shut down the whole cluster to fix one server.
MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Once the plugin stops, check that the executed transaction set is ready for the update. In some restore flows, you must reset the master binary log state first. Now you can update the purged transaction set with the needed transaction identifiers. Double-check the new values against the primary node to make sure they match.
After the update finishes, start the Group Replication plugin on the node again. Watch the server logs to verify that the node joins the group without errors. Wait for the member state to show as online before you send app traffic back.
How to prevent transaction state conflicts
Most teams hit this error during rush recovery tasks or manual server setup. You can avoid this problem by putting strict checks into your database setup scripts. Always verify the replication plugin state before your scripts try to load backup data.
Limit who can run state change commands on production database nodes. Only senior database admins or tested automation tools should change transaction history. Use peer review for any task that edits binary log states or cluster membership. Also, keep your binary log retention window long enough to handle normal node restarts. When logs stay on disk longer, nodes can catch up without manual purged set edits.
Inspect every MySQL query and response in flight
Static grants and network rules block bad logins. They cannot pause a risky query for review or mask emails in a result set. By design, hoop.dev sits inline in the MySQL protocol as a sidecar for your MySQL. For every plain query, prepared statement, or cursor an agent or human runs in production, hoop.dev decides to pass, mask, block, or hold it for review.
First, hoop.dev guardrails block banned actions before MySQL runs them, and an AI Analyzer you configure can score intent or escalate for approval. Next, hoop.dev data masking rewrites sensitive string columns in results in memory, and every verdict goes to the audit trail. Find the open-source binary on GitHub.
Frequently asked questions
What does ER_UPDATE_GTID_PURGED_WITH_GR mean in MySQL?
It means you tried to change the GTID_PURGED value while Group Replication was running. MySQL blocks this action with error code 3911 to keep cluster history safe.
Do I need to stop the whole cluster to fix mysql error 3911?
No, you only need to stop the Group Replication plugin on the single target node. Other nodes in the cluster can stay online and serve app traffic.
When do admins need to update the GTID_PURGED set?
Admins update this value when they seed a new replica from a backup file. They also update it when they must skip a bad transaction during recovery.
Related guides
In this post