Optimize and Repair MYSQL Database on OS X
MYSQL comes with a very powerful tool to optimize and repair your database called mysqlcheck.
![]()
To have mysqlcheck check and repair all of your databases:
Open a Terminal window (Applications -> Utilities - > Terminal)
Type:
mysqlcheck -u username -p -r –all-databases
enter your password when prompted, hit enter.
If you want to use mysqlcheck on just one database type:
mysqlcheck -u username -p -r databasename