MySQL error #1036 – Table is read only

You may receive the following error while repairing or optimizing the MySQL tables:

WHMCS Complete Billing and Support

#1036 – Table ‘xyz’ is read only

When the MySQL tables are in “read only” status, you can update or insert any data in them. In most cases this happens due to incorrect ownership for mysql data directory or data files. The ownership of the mysql director and data files must be mysql:mysql. To correct the ownership, you can run the following command via SSH:

chown -R mysql:mysql /var/lib/mysql

If MySQL data are not stored in /var/lib/mysql, you will need to update this path as per your installation. After changing the ownership, you will need to restart MySQL service:

service mysql restart

-OR-

/etc/init.d/mysql restart

This should fix the “read only” status.

Posted in MySQL.

One Comment

  1. Pingback: WordPress no “Publish” button but “Submit For Review” only for Admin user

Leave a Reply

Your email address will not be published. Required fields are marked *