How To Quickie: Repair MySQL Tables

After a long, hard day of fetching and editing tables, MySQL can become overburdened and create overhead. This can be almost directly compared to how defragmentation occurs on a hard drive. For example, something needs to be replaced in one location but there is not enough space so part of it goes here and part goes there; discontinuous. Over time, overhead for very active tables in your database can reach high levels and the result will be something like what happened to me in March. You can ensure a healthy database by following this quick fix every once in a while.

1) Locate and login to your phpMyAdmin client. 2) Select the database and click on the name of the database (circled).

Repair MySQL Tables in phpMyAdmin

3) You should see all of the tables for your database.

Repair MySQL Tables in phpMyAdmin

4) Select the checkboxes for each table that has an overhead value.

Repair MySQL Tables in phpMyAdmin
This was only for example. Tables with an overhead value under a kilobyte aren't really anything to worry about.

5) Go to the drop-down menu with selected on the bottom and select repair. 6) If everything works out, you will see the something like the image below.

Repair MySQL Tables in phpMyAdmin

7) Clicking on the database name again should show the screenshot below, with no overhead for any of the tables. That's it!

Repair MySQL Tables in phpMyAdmin
Paul StamatiouPaul Stamatiou

Paul Stamatiou is a designer, developer and photographer living in New York. He has been a product designer at Twitter since 2013. More »

Subscribe Share
Keep reading

Enjoy this article? Tweet it.

"How To Quickie: Repair MySQL Tables" by @Stammy