1769
MariaDBERRORCommonAccess ControlHIGH confidence

Server is in read-only mode

Production Risk

High — all writes blocked.

What this means

A write operation was rejected because the MySQL server is running in read-only mode (read_only or super_read_only is enabled).

Why it happens
  1. 1read_only=ON in my.cnf or set dynamically.
  2. 2super_read_only=ON preventing even SUPER users from writing.
  3. 3Server promoted to a replica with read_only enforced.
How to reproduce
trigger — this will error
trigger — this will error
INSERT INTO tbl VALUES (1); -- on a read-only server

expected output

ERROR 1769 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement.

Fix 1

Disable read_only if the server should accept writes

Disable read_only if the server should accept writes
SET GLOBAL read_only = OFF;
SET GLOBAL super_read_only = OFF;

Why this works

Turns off read-only mode so writes are accepted.

Fix 2

Redirect writes to the primary/master server

Redirect writes to the primary/master server
-- Update application connection string to point to the writable primary

Why this works

Routes writes to the correct server in a primary-replica setup.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1769 ER_READ_ONLY_MODE

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors