How to Fix MySQL Error 3191 (ER_GROUP_REPLICATION_MAX_GROUP_SIZE)
You see mysql error 3191 when a new server tries to join a full cluster. You fix this error by removing an old member or using read replicas instead. Database clusters use group replication to keep data safe across multiple servers. Still, the engine sets a strict cap on the total member count. When you try to start replication on a tenth server, the command fails. The database engine returns symbol ER_GROUP_REPLICATION_MAX_GROUP_SIZE and SQL state HY000. The message states that the command fai
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 see mysql error 3191 when a new server tries to join a full cluster. You fix this error by removing an old member or using read replicas instead.
Database clusters use group replication to keep data safe across multiple servers. Still, the engine sets a strict cap on the total member count. When you try to start replication on a tenth server, the command fails. The database engine returns symbol ER_GROUP_REPLICATION_MAX_GROUP_SIZE and SQL state HY000. The message states that the command failed because the group already has 9 members. Understanding why this hard limit exists helps your team build a stable server setup.
What causes mysql error 3191 in your cluster
Group replication uses a consensus protocol to keep every member server in sync. Every member must talk to every other member before the cluster writes new data. As you add more servers, network traffic between the members grows very fast. Beyond nine servers, this constant network chatter slows down write speeds across the group. To prevent severe lag, the database engine blocks a tenth server from joining.
Sometimes, you hit this limit even when you think you have fewer active servers. A dead server might still hold a spot in the cluster member list. If a node loses network contact, the group takes a moment to drop it. During that window, the cluster still counts the unreachable server toward the nine-member limit. Auto-scaling rules can also spin up extra servers by mistake during traffic spikes. When the tenth instance tries to join the group, the engine blocks the request.
How to check and fix the group size limit
To fix this error, first check the current member list from an active node. Have an admin inspect the replication status table to see all nine registered servers. Look for any server that shows an offline, error, or recovering state. If an old server is still listed, stop group replication on that retired node. Wait for the cluster view to update and drop the old server entry.
Once the member count drops to eight, your new server can join the group. If all nine servers are active and healthy, you must change your scaling plan. Do not try to force more servers into the same consensus group. Instead, attach standard asynchronous read replicas to your existing group members. These read replicas copy data from the group without joining the consensus ring. This approach lets you scale read traffic while keeping the core group under nine nodes.
MySQL Access Governance + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
How to prevent cluster scaling errors in production
You can avoid hitting the nine-member ceiling by tightening your cluster automation rules. Set a hard cap in your deployment scripts so they stop at eight or nine nodes. Leave room for one temporary node if you replace servers using rolling updates. When you upgrade a node, remove the old instance before adding the next one.
You should also limit who can run replication commands on production database servers. Give engineers read-only roles when they only need to check cluster health tables. When someone runs a repair command, require peer approval and log every query. If an engineer queries user tables during a check, mask emails and phone numbers. Data masking rewrites matched fields in results like card numbers and national IDs. This keeps sensitive data safe while your team fixes the replication group.
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
Can I raise the nine-member limit in MySQL group replication?
No, the nine-member limit is built into the database engine for group replication. You cannot change a setting to allow ten or more servers in one group.
How do I add more read capacity if my group already has nine members?
You can attach standard asynchronous read replicas to any of the nine group members. These extra replicas handle read queries without counting toward the nine-member group limit.
Why does mysql error 3191 happen when I only have eight running servers?
A crashed or removed server might still appear in the active group member view. Check the member status table and wait for the cluster to expel dead nodes.
Related guides
In this post