Constant corruption - and I'm not even talking about the government!
January 25, 2008 1:42 PM Subscribe
I have a few mysql tables that keep repeatedly getting corrupted - help!
I'm running a website that uses OSCommerce, though that in particular may not be relevant to my problem. The sessions and whos_online tables both seem to keep getting corrupted. I run myisamchk -r on them (even after stopping mysql server altogether in order to do so, just in case) and they're fine for a very short while (measured in minutes, not even hours) and then both keep getting corrupted again.
I've rebooted the server (Red Hat linux), I've tried dropping the tables and recreating their structure, and I'm now at my wit's end.
I figured a reboot would run fsck to see if it was a disk issue. I must plead ignorance here -- I'm an amateur when it comes to being a sysadmin, and I built this box so long ago I don't remember if it ran fsck on boot automatically, or if some other job checks first if it should run fsck, or what... Anway, I looked a boot.log and see no record of fsck being run.
Anyone know what might be causing this, or what else I can look into? My understanding is that I can't run fsck on a mounted file system so I'm not sure what to do.
posted by twiggy to computers & internet (12 answers total)
Also, it may be possible to switch MySQL from ISAM to InnoDB tables; here's an article on that. I have to admit I don't know a huge amount about the two table types, but I understand that InnoDB is newer and more reliable. Of course, make very sure you have your filesystems in good order before you try anything drastic like that, lest you trash the whole database. In fact, I would probably download a whole mysqldump right now, just in case.
posted by pocams at 1:52 PM on January 25, 2008