Page 1 of 1

Using mysqlcheck --auto-repair command

Posted: Mon Apr 21, 2008 3:47 pm
by sfmartin
Hi all,

Is there any risk to execute the mysqlcheck auto repair command at the system start?

I have a system installed in a place where I have lot of power issues. I am having aproximately one power loose per day. Most of the time the system restart without problems, but sometimes the sql database gets corrupted. Fortunately after running this command everything is fixed.

That is why I would like to run this command during each system startup to get rid of this situation, for example, adding it on the /etc/rc.local file.

Any feedback will be really appreciated.

Thanks,
Sebastián

UPS

Posted: Mon Apr 21, 2008 4:22 pm
by darkpaw
Wouldn't a safer option (and far less time consuming) be to just add a UPS to the system? This will remove the problem of it crashing (unless the outage is long enough to run the UPS battery all the way down). And since most UPS units also do voltage regulation, it will reduce the damage being done to that system's power supply from all the power spikes.

Posted: Mon Apr 21, 2008 4:41 pm
by sfmartin
Thanks darkpaw for your reply. What you are stating is the correct thing to do. I have plans to buy a UPS for this system, but since this is not in my priority list, I was wondering if executing the auto repair command at system start could be dangerous in some way for the application itself or data integrity.

Regards,
Sebastián

Posted: Mon Apr 21, 2008 5:11 pm
by Lee Sharp
Depends on how you run it. You have to finish before zoneminder starts, or it will cause as many issues as it fixes. The UPS is the answer.