Table read only – update error in mysql

Table read only – update error in mysql

When you move a database from other server and tried to update it, it might generate an error saying: Table tbl is read only
The very likely case for this is mysql is not able to access the tables due to ownership.
Here is a workaround for it:
1. Go to Terminal – Application->Accessories->Terminal
2. Change the the ownership to mysql using this command
sudo chown mysql:mysql -R /var/lib/mysql/your_db_name
This command will change the owner (chown) of the db to mysql

find longest word in the sentence

Get maximum occurring character

Flatten nested javascript array

Implement Queue Using two Stacks – JavaScript algorithm

Update Node and npm on mac OSX

Tunneling to AWS instance using pem file

Leave a Reply

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

*
*