Repair All MySQL / Command Line

Check all databases:

mysqlcheck -c -u root -p –all-databases

Optimize database:

mysqlcheck -u root -p –auto-repair -o ogdemo

Repair all:

mysqlcheck -u root -p –auto-repair -c –all-databases