The InnoDB engine is running in read only mode so any statement that modifies data fails.
ER_INNODB_READ_ONLY means MySQL started with the InnoDB engine locked in read only mode, so inserts, updates, and deletes are blocked. Remove the --innodb-read-only flag, fix file-system permissions, or switch the instance back to read write and the error disappears.
ER_INNODB_READ_ONLY
MySQL raises ER_INNODB_READ_ONLY (error code 1874, SQLSTATE HY000) when the InnoDB storage engine has been started in read only mode. While active, the server allows only SELECT and administrative statements that do not modify data.
The condition is usually intentional - for example, a MySQL replica mounted on read only storage - but it can also appear after a crash, a permission change, or a misconfigured startup flag.
The message surfaces at runtime whenever an application issues INSERT, UPDATE, DELETE, CREATE, DROP, or any DDL/DML that needs write access to an InnoDB table. The server immediately aborts the statement and returns error 1874.
Read only mode prevents schema migrations, data ingestion, and routine updates. If the state is accidental, restoring write capability is critical to resume normal operation, avoid data drift, and keep applications online.
Most frequently the server was started with the --innodb-read-only flag or with super_read_only enabled. A disk mounted as read only or a file-system permission change can also push InnoDB into this mode. Crash recovery that detects corrupt redo logs may fall back to read only until manual intervention.
Confirm the mode with SHOW VARIABLES LIKE 'innodb_read_only'. If ON, restart mysqld without the flag or set GLOBAL innodb_read_only = OFF when permitted. Ensure the underlying file-system is mounted rw and MySQL has write permissions on the datadir. If super_read_only is active, disable it with SET GLOBAL super_read_only = OFF.
A replica server traditionally runs with read_only but not innodb_read_only. Ensure you are using the correct variable. On Kubernetes, a persistent volume may mount read only after a node restart; remount it rw and recreate the pod. After crash recovery, inspect the error log, run innodb_force_recovery correctly, then return to normal mode.
Automate startup scripts so innodb_read_only is never set in production unless needed. Monitor SHOW GLOBAL VARIABLES regularly and alert when innodb_read_only or super_read_only flip to ON. Keep consistent file-system permissions and ensure backups do not overwrite them. Test failover procedures so mounts come back read write.
Error 1290 - The MySQL server is running with the --read-only option: occurs at the global server level rather than engine level. Disable read_only or adjust super_read_only accordingly. Error 1036 - Table is read only: usually points to file-system permissions on a single table.
The server was explicitly launched in read only mode, often by automation or a mistaken flag.
Global read only settings override normal privileges and propagate to InnoDB.
The operating system mounted the volume as read only after an I/O error or manual action, blocking writes from InnoDB.
MySQL lacks write permission on the data directory or redo log files, so the engine switches to read only for safety.
InnoDB may enter read only when forced recovery levels 4-6 are used or when corruption is detected.
Global read only flag that blocks all writes, including non-InnoDB engines.
Table-level permission or file-system issue affecting a single table rather than the whole engine.
Often reported when applications expect writes but are blocked by locks; may surface alongside read only misconfiguration.
Companion error triggered on specific statements when innodb_read_only is ON.
Yes, if MySQL was not started with the static --innodb-read-only flag. Use SET GLOBAL innodb_read_only = OFF, then verify with SHOW VARIABLES.
Turning off super_read_only permits writes on replicas, which may break replication integrity. Keep it ON on replicas unless performing maintenance.
A read only file-system or datadir permission issue can keep InnoDB effectively read only even when the variable is OFF. Check the OS layer and MySQL error log.
Galaxy surfaces server variables and error logs directly in its sidebar, alerting engineers when innodb_read_only or super_read_only flip to ON so they can react before writes fail.