Page 1 of 1

MySQL going read only :(

Posted: Thu Aug 08, 2002 2:34 am
by Coyote
I have MySQL running on IIS5 (with PHP 4.2.2)

I have been building a CMS type system for an intranet, and it all seemed to work well (even though - looking back my coding, it should be re-wrote!)

but the problem...........
over the last couple of days I have noticed that changes that were made to the database are no longer there :( and it appears that I have been updating data without checking if it was posted, and it wasnt.

When ever I make a change - it reverts back to what was in the table before hand - as if its read only, but even if I log in as a superuser with full rights it doesnt make a difference.

It has been working for months but has suddenly stopped and even my admin.php pages have stopped working :( - they connect to the database and submit as normal, but the change isnt made :(

I am also using MySQL Front as the GUI interface and I have discovered that I need to post the data after changing the data, which is ok when in mysql front, but not from my admin pages.

The only thing different that I have done recently is use a command batch routine which dumps my data each nite.

Code: Select all

cd \dbbackup
mysqladmin  flush-hosts flush-logs flush-status flush-tables flush-privileges
mysqldump --all --add-drop-table --add-locks --complete-insert --compress --extended-insert --flush-logs --force --opt --verbose --databases myfiles>backup.sql
I got this routine off a users comment at PHP.net, but I dont understand it fully.

I have noticed that it dumps the data without logging into MySQL though!?

could this have caused a file lock somewhere?

Thanks for taking the time to read about my mess.

Any help appreciated.

Thanks.

files commited?

Posted: Thu Aug 08, 2002 7:38 am
by Geschi
I guess you lost your data due to you batch routine. Assuming you've the SQL server running all the time it ain't an advantage to flush your logs first and then doing the backup. As long as you don't commit your new data records they are temporary. Therefore try mysqldump first and the flush everything using mysqladmin.
Well, that's my point of view.

Geschi