When I want to execute an update
query on my table I got an error saying:
1036 - Table
data
is read only.
How can I fix that?
Table attributes in /var/db/mysql
are set to 777
.
'Repair Table' function doesnt seems to help.
Is there anything I can do with that?
You should at least have the necessary privileges on your specific table. If that's the case, try to repair the table (it may have crashed). If you're still getting “read only” messages, check the file permissions in /var/lib/mysql/dbname/tbl_name (assuming your database is in /var/lib/mysql).
Using SQL SERVER Management Studio: Right click on Database, select Properties. And in the Database Properties window, select Options page. In Options page, under State change Database Read Only value to False.
To identify if a table is read-only, a new column called READ_ONLY has been added to DBA_TABLES, USER_TABLES, and ALL_TABLES. This column is set to YES if the table is read-only and NO when the table is not read-only.
In my case, mysql config file had innodb_force_recovery = 1. Commenting that out solved the issue. Hope it helps someone.
who owns /var/db/mysql and what group are they in, should be mysql:mysql. you'll also need to restart mysql for changes to take affect
also check that the currently logged in user had GRANT access to update
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With