Years ago I had the following script running as a cron job, but then I lost it somewhere. It took me a few minutes to find it again, but just in case I need it in the future, I’m saving it here.
#!/bin/bash mysqlcheck --all-databases mysqlcheck --all-databases -o mysqlcheck --all-databases --auto-repair mysqlcheck --all-databases --analyze
Found it here this time.
You could also do
-A -a
where -A is –all-databases and -a is –analyze
That’s exactly what the last line is doing ;)
Yeah, but shorter I mean. :)
More efficient typing in newer versions. :)
It’s a shell script. Type once, use plenty :)