dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Home/Error Library/mysql-1290-server-running-read-only-option
MySQL
MySQL 8.0 - 8.4Replication & HA
7 min read
ERROR 1290 (HY000): The MySQL server is running with the --read-only option

MySQL Read-Only Server Error: Post-Failover Demoted Primary, super_read_only Protection & ProxySQL Routing

Diagnosing write attempts against replica instances and demoted primaries retaining read_only mode, emergency topology triage, and ProxySQL routing split.

Reviewed by:Senior Database Architect & SRE (dataiotech Labs)
Tested Versions: MySQL 8.0 / 8.4 LTS / 9.0

Operational Verification & Reliability Metadata

Last Technical Review: 2 Kasım 2026
Tested VersionsMySQL 8.0.36, 8.4.1 LTS (Group Replication / Orchestrator)
Required PrivilegesSYSTEM_VARIABLES_ADMIN or SUPER privilege
Risk Assessment
HighAccidentally disabling read_only on replica nodes causes replication divergence
Expected Output@@read_only and @@super_read_only resolving to OFF on primary
Rollback Procedure:SET GLOBAL super_read_only = ON; SET GLOBAL read_only = ON;
MySQL Docs: read_only and super_read_only System Variables
First 60 Seconds Emergency Protocol:

The error string is a symptom, not the root cause. Do not restart the server blindly. Run the diagnostic queries below to pinpoint the actual failure mode.

▸Symptom

Write queries (INSERT, UPDATE, DELETE) fail with:

plaintext
ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement ERROR 1839 (HY000): Cannot execute statement: server is running with the --super-read-only option enabled

▸What You See in Production

Following a failover event, application write paths fail completely while read requests continue normally.


▸Root Cause Matrix

ProbabilityRoot CauseDescription
%65Client Routing to Replica TargetApplication pool points to read replica rather than promoted primary instance.
%25Demoted Primary Retained Read-OnlyFormer primary retained read-only mode after graceful topology failover.
%10`super_read_only` Safety LockPrevents even administrative users from writing to follower instances.

▸EMERGENCY RUNBOOK (0-5 min)

sql
-- 1. Inspect read-only flags SELECT @@read_only AS ro, @@super_read_only AS sro; -- 2. Confirm cluster member topology SELECT * FROM performance_schema.replication_group_members; -- 3. If THIS NODE IS CONFIRMED PRIMARY, disable read-only mode SET GLOBAL read_only = OFF; SET GLOBAL super_read_only = OFF;

▸PERMANENT BLUEPRINT

  1. 1ProxySQL Topologies: Route write traffic through proxy layer capable of automated primary discovery.
  2. 2Enforce `super_read_only` on Replicas: Protect follower replicas from unintended administrative writes.

▸Verification

sql
SELECT @@read_only, @@super_read_only;

Other Database Error Triage Playbooks

Other battle-tested diagnostic guides for high-severity database errors.

All Errors (82)