How to Fix MySQL Error 1775 (ER_GNO_EXHAUSTED)
You get mysql error 1775 when a server runs out of Global Transaction ID numbers. You fix it by restarting the database with a fresh server UUID. MySQL uses global transaction identifiers to track every change across a cluster. Each identifier has two parts. The first part is the unique ID of the server. The second part is a sequence number that goes up with each transaction. When that sequence number hits its hard upper limit, the database stops taking writes. The engine throws the ER_GNO_EXHA
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 1775 when a server runs out of Global Transaction ID numbers. You fix it by restarting the database with a fresh server UUID.
MySQL uses global transaction identifiers to track every change across a cluster. Each identifier has two parts. The first part is the unique ID of the server. The second part is a sequence number that goes up with each transaction. When that sequence number hits its hard upper limit, the database stops taking writes. The engine throws the ER_GNO_EXHAUSTED symbol with SQLSTATE HY000. At that moment, the database tells you it cannot make a new GTID.
Why mysql error 1775 happens in production
The sequence number in a transaction ID has a massive upper limit. Under normal traffic, a database takes centuries to use up every number. Because of this, normal app writes almost never trigger mysql error 1775 on their own.
In practice, this error points to a mistake during cluster maintenance or recovery. Operators sometimes change the purged transaction set to skip bad replication events. If an operator sets the transaction counter near the top limit, numbers run out fast. A broken recovery script can also push the sequence number close to the ceiling.
Once the counter reaches the maximum integer value, the server protects data integrity. It refuses to wrap the counter back to one. Wrapping the number would cause duplicate transaction IDs and break replication across the cluster. Instead, the engine blocks new changes and asks for a new server UUID.
How to diagnose and fix the exhausted counter
First, check your database error logs and replication status views. Look at the executed transaction set on the primary node. You will see your current server UUID paired with a huge upper range number. Check which node in your cluster generated that specific UUID.
Do not try to reset the transaction history on an active production cluster. Clearing the history on a live node breaks replica tracking and risks data loss. Also, do not grant broad superuser permissions to app accounts as a workaround.
MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
The official fix requires you to generate a fresh server UUID for the affected node. First, drain app traffic from the affected database instance. If you have a healthy replica, promote it to take over write traffic. Make sure all replicas catch up with the last valid transactions first.
Next, stop the MySQL process on the server that ran out of numbers. Locate the auto-generated file in the data directory that stores the server UUID. Remove or rename that file so the engine knows to make a new one. Start the MySQL service again. Upon startup, the database creates a brand new UUID and starts its counter at one. Old transactions keep the old UUID in the history, so replication stays intact.
How to prevent transaction number exhaustion
You can avoid this failure by putting strict guardrails around replication maintenance. Never let scripts or operators inject arbitrary high numbers into the purged transaction set. When you need to skip a failing transaction, inject the exact next sequence number only.
Review every manual change to replication state with a second engineer before running it. Also, set up alerts on your transaction sequence gaps and upper bounds. If a counter jumps by billions in one day, your team gets an early warning. You can then rotate the server identity during a planned window before writes stop.
Add wire guardrails and masking beside MySQL
Database grants and TLS setup decide who can reach MySQL. Even so, an open session can run broad updates or read raw personal data from allowed tables. In practice, hoop.dev sits inline in the wire protocol beside the database as a sidecar for your MySQL. On every production query an agent or engineer sends, hoop.dev decides to pass, mask, block, or escalate it for human review.
With hoop.dev MySQL support, guardrails refuse bad queries before they run or hold risky calls for approval, while data masking rewrites matched sensitive values in result rows in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for GDPR, HIPAA, and PCI DSS programs. Read the docs and source on GitHub.
Frequently asked questions
What does the ER_GNO_EXHAUSTED message mean in MySQL?
It means the integer part of the Global Transaction ID reached its maximum value. The server cannot make new transaction numbers under its current server UUID.
Does changing the server UUID break existing replication replicas?
No, replicas track all past transactions using the old UUID in their history set. New transactions simply use the new UUID and start counting from one again.
Can normal database write traffic exhaust the GTID counter?
Normal write workloads will not exhaust the sixty-three-bit integer limit for thousands of years. Reaching the limit almost always comes from someone setting a high transaction number by hand.
Related guides
In this post