[mythtv-users] mysqlrepair all tables on startup

Ronald Frazier ron at ronfrazier.net
Wed Jan 27 13:55:47 UTC 2010


On Tue, Jan 26, 2010 at 5:55 PM, Glenn B. Lawler
<gblawler at incodesystems.com> wrote:
> I would like to run a script with:
>
> mysqlrepair mythconverg {tablename}
>
> for each table on startup.
>
> I am running MythTV 0.21 under gentoo.
>
> Could someone send me information about how to include such a script in the startup procedure?


I launch a script from my crontab using the @reboot syntax:
@reboot /usr/local/scripts/repair_mysql


This script runs the following command:
/usr/bin/mysqlcheck -u backup_user --repair --optimize --analyze
--all-databases --silent


(yes I could probably put that command straight into the crontab...but
the script used to do multiple things before I simplified it)

Anyway, in that command "backup_user" is a mysql user I created with
permission to everything in mysql (I use the database for other apps
beside myth). This command will repair every database on the system
(including mythconverg)

-- 
Ron


More information about the mythtv-users mailing list