1836: ER_READ_ONLY_MODE: Running in read-only mode
MySQLWhat does it mean?
InnoDB is running in read-only mode (innodb_read_only=ON) or the data directory/media is read-only; writes and DDL on InnoDB tables are rejected. Note: a write attempt while read_only/super_read_only is enabled returns 1290 (ER_OPTION_PREVENTS_STATEMENT), not this code.
Why does it happen?
The server was started with innodb_read_only=ON (e.g. read-only media, a shared data directory, a copy for analysis); in this mode changes such as INSERT/UPDATE/DELETE and CREATE/DROP/ALTER TABLE cannot be made to InnoDB tables.
How to fix it
If writes are needed, start the server without innodb_read_only: remove the innodb_read_only=ON line from my.cnf and restart (this variable is not dynamic and requires a restart). To check the state: SELECT @@innodb_read_only; Verify that the data directory and file system are writable. If you are writing to a replica/HA secondary (1290), route writes to the primary.
More from this engine
- 1969MariaDB: Query execution was interrupted (max_statement_time exceeded)
- 1927MariaDB: ER_CONNECTION_KILLED: Connection was killed
- 1290ER_OPTION_PREVENTS_STATEMENT: running with the --read-only option
- 3819ER_CHECK_CONSTRAINT_VIOLATED: Check constraint is violated
- 1118ER_TOO_BIG_ROWSIZE: Row size too large
- 1170ER_BLOB_KEY_WITHOUT_LENGTH: BLOB/TEXT column used in key specification without a key length
- 1592ER_BINLOG_UNSAFE_STATEMENT: Unsafe statement written to the binary log