[mythtv-users] Repair mysql tables after power failure?
David Brodbeck
gull at gull.us
Wed Oct 3 16:36:39 UTC 2007
On Oct 3, 2007, at 6:51 AM, Mike Perkins wrote:
> Hmmm. Note to self: add this to startup on the master backend, in
> such a way it
> runs before the backend starts. The master backend machine
> currently stays up
> forever, unless there's a power outage. Although I run a script
> containing this
> around 02:00 every night, I hadn't considered possible corruption
> after a power
> cut/restart. Filesystems get checked on startup, why not databases?
>
> In fact, does Mysql do anything useful on startup in this regard?
I don't think it does by default. Some distributions include a table
check in their startup script. I like to add one, for the reasons
you state.
If you want to get really fancy, create a file in the startup script
and delete it in the shutdown script, then only do the check on
startup if the file is present. This would mimic the way fsck will
only check "dirty" filesystems.
More information about the mythtv-users
mailing list