MySQL Table Read-Only Error: "Table Data is Read Only"
Experiencing the "Table data is read only" error while attempting to execute an update query can be frustrating. To address this issue, various solutions can be explored.
Firstly, ensure that the table attributes in /var/db/mysql are set to 777, which you have already verified. Additionally, attempting to repair the table using the 'Repair Table' function may not resolve the issue.
However, you have mentioned that the innodb_force_recovery parameter in the MySQL configuration file was set to 1. This setting forces MySQL to skip recovery and start with a clean database, which can result in tables being marked as read-only.
To resolve this issue, comment out the innodb_force_recovery line in the MySQL configuration file. This will allow MySQL to perform normal recovery and should resolve the read-only issue.
The above is the detailed content of How to Fix the \'Table data is read only\' Error in MySQL?. For more information, please follow other related articles on the PHP Chinese website!