Today when one of my acquittance asked me that he is unable to access mysql on his wamp server I asked him to show me his system. Initially I thought that the problem is in his php script. I check the script but nothing was wrong.
Then I decided to check the query. The query was also looking fine. I was suspecting that the problem might be related to incorrect syntax so I decided to print the query generated by php and run it direct on mysql server (it was insert statement).
When I fired query on mysql server it displayed "#1036 - table is read only wamp" I suspected the user credentials. but I was logged in as root. So how come I was having read only permission. after thorough checking I found that my database was using MRG_MyISAM as storage Engine. May be he did not paid attention while creating the database. So the solution to the problem is as follows.
Then I decided to check the query. The query was also looking fine. I was suspecting that the problem might be related to incorrect syntax so I decided to print the query generated by php and run it direct on mysql server (it was insert statement).
When I fired query on mysql server it displayed "#1036 - table is read only wamp" I suspected the user credentials. but I was logged in as root. So how come I was having read only permission. after thorough checking I found that my database was using MRG_MyISAM as storage Engine. May be he did not paid attention while creating the database. So the solution to the problem is as follows.
- login to phpmyadim
- select the table (you will have to apply this on each table)
- click on operations tab
- locate storage engine under table options
- click on dropdown and select InnoDB.
- Click "GO" button to apply this settings
This saved my day!!
ReplyDeleteThanks!!It helps me😀
ReplyDelete