Page 1 of 1

Error: table is read-only

Posted: Fri Oct 04, 2002 6:13 am
by twigletmac
Currently my company runs PHP and MySQL (3.23.52) on IIS (no we can't change to Apache much as I'd like to). At the beginning of this month we changed hosts and now we're having loads of problems with MySQL. Our previous server had Win NT4 and IIS 4 and the new one has Win2K and IIS 5.

The problems that we are now experiencing are incredibly frustrating and irritating. Firstly, tables can't be overwritten claim that they are in use even when the service has been stopped. Secondly the service crashed this morning and we had to reinstall MySQL (with exactly the same configuration settings as before) to get it going again. Then we could read from the database but not write to it and kept getting 'this table is read-only' errors when we tried. Eventually it decided that it could write as well as read from databases and we don't know why. Searching MySQL's docs and the web hasn't turned anything up and I just can't find anything about this error message. If someone else has experienced this before and/or knows what is causing it and how we can stop it happening you'd save me and my fellow developers a lot of headaches.

I have never had any problems with MySQL before and I'm fairly certain it's most likely something to do with IIS but any suggestions are welcome.

Mac

Posted: Fri Oct 04, 2002 6:41 am
by volka
I have never had any problems with MySQL before and I'm fairly certain it's most likely something to do with IIS but any suggestions are welcome.
Is IIS also responsible for El NiƱo? ;)
Does this also happen if you switch to php-cgi?

Posted: Fri Oct 04, 2002 6:56 am
by twigletmac
It is PHP cgi. I think it might be the way that our new hosting company have set up security on the server. But 'cause I decided to sleep in today (obviously felt the foreboding) nothing could get sorted until I got here (2 and 1/2 hours after the service crashed). I keep mumbling Linux under my breath...

If anyone knows exactly what permissions are required on Windows 2K to have the MySQL data directory be both read and writeable but not put it at too much risk from the malicious people out there I'd appreciate the help.

Mac

Posted: Fri Oct 04, 2002 6:58 am
by twigletmac
Oh and Microsoft and their software are responsible for everything bad that happens including global warming and that guy who cut me up on the way to work this morning... :lol: Ok, not likely but they could be...

Mac

Posted: Fri Oct 04, 2002 8:00 am
by volka
although I'm using apache at least my box here at home is w2k ;)
The account the mysql-service is started with is localsystem (installation default).
I can reproduce the error (table 'xyz' is ready only) by explicitly revoking the write permissions for localsystem (properties of the folder of the database --> security/permission settings [sorry, have a german w2k] --> account SYSTEM --> allowing list and read content, disallowing write permission, others kept blank).
If the account for mysqld has been altered it should apply to this account the same way.
If possible check the settings for the mysql-account, the write permission field must be checked (even if grayed out)