It looks like this thread was abandoned in 2012 without a conclusion. I posted a question to this thread April 15, 2015 and haven’t seen a reply so I am starting this fresh thread in the hope that it will be noticed and answered.
What, exactly, is the recommended method/MYSQL command to use to repair and optimize all of the 4096 db’s in my multisite multi-db database and save and email me a backup copy of the entire db with as few actions as possible?
(note~ all my master and sub db’s use the same user/pass setup as per the multidb setup instructions. I am running Debian 3.16.7 on a VM on the google cloud. MySQL Server version: 5.5.40)
How, exactly, can I set up a cron job to do this on a regular basis?
mysqlcheck -u root -p --optimize --all-databases
mysqlcheck -u root -p --auto-repair --all-databases
They both ran. They both spit out long lists of results with this error at the end of the second script.
warning : Table is marked as crashed and last repair failed
warning : 1 client is using or hasn't closed the table properly
warning : Size of datafile is: 848 Should be: 772
error : Keypointers and record positions doesn't match
warning : Found 13 key parts. Should be: 9
error : Corrupt
error : Can't create new tempfile: './mysql/user.TMD'
status : Operation failed
I’m not sure how to interpret these results. Was this error thrown because the last db that got optimized is , as yet, empty? Any ideas?
It would seem that a reliable optimizing and repair db method/script, run on a daily (or weekly) schedule, is a universal requirement for everyone who uses the multi-db plugin. The idea from @argh2xxx for a plugin to perform this task would be a wonderful thing….in the meantime…