Common SQL Errors

MySQL Error 1036 (ER_OPEN_AS_READONLY): Table Is Read Only - Fixes and Prevention

Galaxy Team
August 5, 2025

MySQL error 1036 occurs when the server detects that a table or its underlying filesystem is read only, blocking any INSERT, UPDATE, or DELETE operations.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1036 (Table is read only)?

MySQL Error 1036: ER_OPEN_AS_READONLY appears when MySQL flags a table as read only because the file system, tablespace, or server itself is in read-only mode. Restore write permissions or disable global read_only to resolve the issue.

Error Highlights

Typical Error Message

Table '%s' is read only

Error Type

Permission Error

Language

MySQL

Symbol

ER_OPEN_AS_READONLY

Error Code

1036

SQL State

Explanation

Table of Contents

What does “Table '%s' is read only” mean?

MySQL throws error 1036 when it cannot open a table with write access. The server marks the object read only, immediately halting any modification attempts. SELECT queries still work, but DML statements fail.

The problem surfaces on standalone servers, replicas, and shared hosting alike. Understanding the underlying restriction allows you to restore full read-write functionality quickly.

When does error 1036 usually occur?

Error 1036 appears after enabling GLOBAL read_only, mounting a data directory in read-only mode, setting a tablespace as read only, or altering file permissions at the operating-system level. It may also arise if a replica is mis-configured or after a crash that forces InnoDB recovery mode.

Because the error blocks writes, it can stall applications, cron jobs, and ETL pipelines until fixed.

Why is swift remediation important?

Delaying a fix risks data staleness, application downtime, and backlog growth in message queues. Production workloads depending on the affected table cannot persist new data, leading to potential revenue loss and monitoring alerts.

Common Causes

Related Errors

FAQs

Does error 1036 always mean the whole server is read only?

No. The read-only condition can be global, per tablespace, or due to filesystem permissions for one database.

Can I bypass error 1036 with SUPER privilege?

Yes. A user with SUPER can write even when read_only is ON. However, this should be temporary and done with caution.

Will restarting MySQL clear the error?

A restart resets volatile variables like read_only, but underlying filesystem issues or my.cnf settings will trigger the error again.

How does Galaxy reduce the chance of this error?

Galaxy tracks environment state, warns when connecting to replicas in read-only mode, and surfaces permission issues before writes run, helping users avoid error 1036.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo