How to Fix MySQL Error 4118 (ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE)
You see mysql error 4118 when a forced member command fails in Group Replication. You fix it by checking node health, quorum status, and network addresses first. MySQL uses Group Replication to keep data in sync across several database servers. When too many servers drop out, the cluster loses its majority vote. The cluster stops taking new writes to protect your data from split-brain issues. Admins can force a new member list to bring the surviving nodes back. If the database rejects that forc
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 4118 when a forced member command fails in Group Replication. You fix it by checking node health, quorum status, and network addresses first.
MySQL uses Group Replication to keep data in sync across several database servers. When too many servers drop out, the cluster loses its majority vote. The cluster stops taking new writes to protect your data from split-brain issues. Admins can force a new member list to bring the surviving nodes back. If the database rejects that forced list, it throws code 4118 with SQLSTATE HY000.
What causes mysql error 4118 in your cluster
The database engine maps this failure to the symbol ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE. The error text states that the global force members command hit a failure. It also prints the exact member string and a short reason for stopping.
This failure often happens when the cluster still has a healthy majority. MySQL blocks you from forcing members if normal quorum is still active. You can only use the force option when the group loses quorum.
A bad address list is another common cause for this specific error. If you pass a server address that cannot be reached, the command fails. A typo in an IP address or port number will break the operation. Include only the live, reachable peers that still hold valid data.
Sometimes a peer node is busy running another group change task. If the local group engine is shutting down, it will reject your request. Network blocks between the surviving servers will also cause the command to time out.
How to diagnose and fix the failure in production
Start by reading the full error log on the node where you ran the command. The end of the error message tells you why the engine stopped. Next, check the member state table to see what each node is doing.
MySQL Access Governance + GCP Security Command Center: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
If most nodes show as online, you do not need to force members. Let the cluster heal itself through normal group communication instead. If most nodes are unreachable, the cluster is stuck and needs manual help.
Write down the exact host and port of each surviving online server. Test the network path between these hosts to make sure they can talk. Run the force member update using only those verified, live peer addresses. Wait for the cluster to form a new view and accept traffic.
Preventing risky recovery mistakes on live databases
Forcing cluster members is a high-risk action that can cause data loss. If you pick the wrong servers, you might overwrite good production rows. You should never grant permanent superuser rights to every engineer for emergencies.
Instead, restrict cluster recovery commands to senior operators with approval workflows. Keep sensitive user data safe during emergency repairs by masking query results. Masking rewrites matched fields like emails, phone numbers, card numbers, and national IDs.
Log every admin command so your team can review the recovery steps later. Clear audit trails help you spot what went wrong during a night outage. Good controls let you fix broken clusters fast while keeping data safe.
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
When should I force members in MySQL Group Replication?
Use this setting only when a majority of nodes crash at once. Never run it during normal maintenance or when the cluster still has quorum.
Why does mysql error 4118 happen when nodes are online?
The database engine blocks forced membership changes when the cluster is already healthy. You can only force a new member list when quorum is lost.
What should I do with the old crashed nodes later?
Stop the group service on the dead nodes before bringing them back online. Once the forced cluster is stable, rejoin the old nodes one by one.
Related guides
In this post