A server has multiple mysql databases with identical schemas. There is a single table within each database that tends to crash and require repairing. We would like to run something like below on a cron.
mysqlrepair --auto-repair --all-databases --force --silent
- For a single table (not large in size) in ~100 databases,
- Reading http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html, it states that the tables being processed are locked from other processes. So, am I correct that this should only be something that runs late at night?
The command above is missing the option to specify a single table. How can I add this and not have it override the
--all-databases
flag? The--tables
flag states itOverrides the `--databases` or `-B` option.
And a related question, short of modifying our application code, is there a better way to be checking/repairing our mysql tables?