User Tools

Site Tools


developmental:mysql:phpmyadmin-repair-table

How to Repair a Table in phpMyAdmin

This article describes how to repair a MySQL table via phpMyAdmin interface on cPanel server. On a cPanel server, this can often also be done directly from within the cPanel interface, but this guide can help if you prefer the phpMyAdmin interface.

Enter phpMyAdmin and Check the Table Engine

Firstly, open phpMyAdmin interface from WHM or cPanel.

If you are in WHM go to Home > SQL Services and click on phpMyAdmin icon:

If you are in cPanel go to Home > Databases and click on phpMyAdmin icon:

This method works only when damaged table is using MyISAM engine. If InnoDB table is corrupted then more advanced methods should be used.

You can check which table engine is used in phpMyAdmin interface by clicking on database in the menu on the left and opening 'Structure' tab. For example, this database has all tables running on MyISAM engine:

This database has all tables running on InnoDB engine:

At the bottom of the table list you can see default MySQL parameters in bold.

Backup the Database

It is strongly recommended to back up database before making changes. To create backup select database in the left menu and go to Export tab. Select “Quick” method and SQL format and then click “Go”. Download .sql file on your PC:

Repair Multiple Tables

To repair multiple tables open tab 'Structure', check the tables you want to repair (you can use 'Check all' option to select all tables), then click on drop-down menu 'With selected:' and click on 'Repair table' in Table maintenance section:

After operation finished you will see the results at the top of the section:

Repair a Single Table

Another way to repair but only a single MyISAM table would be the following.

In the menu on the left find the database which you need to repair. In the menu on the top go to “Operations” tab, find “Table maintenance” section and click on “Repair table” link:

Upon successful repair you will see the message on the top:

developmental/mysql/phpmyadmin-repair-table.txt · Last modified: 2018/01/15 16:19 by Marjorie S.