How to repair and optimise MySQL databases

Overview

If you are using MySQL database a lot, it never hurts to check for any errors, repair the tables and optimize them occasionally. The post is about repairing and optimizing all MySQL Databases easily using a single query.

How to Repair and Optimise MySQL Databases

If your mysql instance crashes or freezes without giving you a good reason try running the command below. Execute the following command followed by the mysql root password to repair and optimize all tables and databases at once.


# mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

mysqlopt 300x176 How to repair and optimise MySQL databases