How to repair all MySQL databases on a server in one go

Here's a quick & ditry trick to repair all MySQL databases on a server, in one go.

Run the following commands on your server, in the console as root.

PHP Code:
PHP Code:
 mysqlcheck --all-databases -#repair 
mysqlcheck --all-databases -#analyze 
mysqlcheck --all-databases -#optimize