Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 388
  • Last Modified:

URGENT - PLEASE HELP!!! How Do I change a Read only table in MYSQl to be writable?

I have a table that was transferred from another server, and it made it read only when it uploaded to the new server.

How can I set this table back to be writable?

The error I get is this:

Invalid SQL: DELETE FROM strikes WHERE striketime < 1113840509 mysql error: Table 'strikes' is read only

mysql error number: 1036

2 Solutions
I found this, hope it helps:
If you encounter "ERROR 1036: Table 'xxx' is read
only", this may be due to a corrupt internal setting in
MySQL. This can occur if, for example, you upload a
new table from a Windows-based MySQL database
directly to a Linux/Unix database. The solution is to
use 'dumpmysql' to dump the databases, THEN be
sure to DROP TABLE for the 'read only tables' or the
internal config will not be properly reset! Deleting the
table files is not sufficient. Once the tables are
dropped, feed the dump file back to mysql, and it will
create the tables anew, and they will be writable.

got it from:
You should use mysqldump to dump the database from your another server to this new server.  
After that drop those tables which are read only. Once you drop the tables, use the mysqldump again to dump your database.
This will create the writable tables.
make sure the table data itself is writable for the mysql-process.

check the filesystem rights for the mysql-datadir. try a chmod on the directory and its contents.
don't forget to restart the mysql-service after changing the settings.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now