phpMyAdmin Database Repair and Optimization Tutorial

How to repair and optimize MySQL databases

In this tutorial we'll show you how to repair and optimize your MySQL databases through phpMyAdmin. It's advisable to perform these operations periodically.

If a database table or tables become corrupt, the application that uses these database tables won't be able to access them. Usually this can be fixed with the Repair function. You can perform it through phpMyAdmin.

To access phpMyAdmin, log in to the HostKnox control panel, go to the Databases section and click on the phpMyAdmin link on the right. This will open phpMyAdmin. In the left frame you'll see listed the databases that you have created. Click on the name of the database that you want to repair. After you do it you'll see the tables of this database displayed in the right frame. Mark the checkboxes in front of the names of the tables, or if you want to repair all the tables just click on Check All at the bottom of the page, and from the With selected drop-down menu at the bottom select Repair table:

phpMyAdmin-Repair Table

After that click on the Go button in the lower right corner and the Repair Table function will be executed. You should receive a message that the SQL query was successful.

The optimization of MySQL databases with phpMyAdmin is done in a very similar way. It's a good idea to optimize your databases regularly. This defragments the database tables, clears blank entries and consequently improves the speed of your site, especially if you have big database tables.

To optimize any of your databases, open phpMyAdmin by clicking on the link in the Databases section of the HostKnox control panel. Then click on the name of the database in the left frame, and the database tables will appear in the right frame. Click on the Check All button at the bottom of the page and from the With selected drop-down menu choose Optimize table:

phpMyAdmin-Optimize Table

Then to execute the Optimize Table query click on the Go button in the lower right corner.