Using mysqlcheck --auto-repair command

Support and queries relating to all previous versions of ZoneMinder
Locked
sfmartin
Posts: 6
Joined: Mon Apr 07, 2008 8:25 pm
Location: Argentina

Using mysqlcheck --auto-repair command

Post 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
darkpaw
Posts: 166
Joined: Thu Apr 26, 2007 2:35 am

UPS

Post 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.
sfmartin
Posts: 6
Joined: Mon Apr 07, 2008 8:25 pm
Location: Argentina

Post 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
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post 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.
Locked