mysql table is read only mode error

1

I recently restored a mysql database from a backup and come to find it wouldn’t allow any modifications.  The problem was the database belonged to user “root”, which is what I used with SSH to restore the database.  The user needs to be mysql.

The fix

Open an SSH connection and navigate to /var/lib/mysql/ and run the following command to recursively set all database owners to mysql -

chown -R mysql:mysql *

Posted in: MySQL
Tags:

This article has 1 comment

  1. Jon 10/14/2010, 10:28 am:

    Thanks for that, saved me a headache. For future dummkopfs like me remember to restart mySQL.

Leave a Reply

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

*




You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">