MySQL: Repair & Optimize all Tables in all Databases

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
or
mysqlcheck -Aor -u root -p
A = all databases
o = optimize
r = repair

via Byte Mods