Before you begin
You will need:
A cPanel account with access to the specific database.
The database name and the specific table name you wish to repair or optimize.
Repair or Optimize a MySQL Database
Log in to your cPanel account.
Locate the Databases section and select phpMyAdmin.
In the left-hand sidebar of phpMyAdmin, click on the name of the database containing the table you want to fix.
A list of tables within that database will appear. Check the box next to the specific table(s) you want to repair or optimize.
Scroll to the bottom of the table list and click the With selected: dropdown menu.
Select the appropriate option:
Repair table — attempts to repair supported tables that are corrupted.
Optimize table — reorganizes the table and may reclaim unused space, depending on the storage engine and table structure.
Confirm the result
PhpMyAdmin will display a success message for each table processed.
The status column for the selected table(s) will indicate that the operation was successful.
If the table is marked as "in use" or "locked"
If you receive an error stating that the table is in use or locked, the repair or optimization may fail.
Check for any active scripts or processes currently accessing the database.
Wait a few minutes and attempt the action again.
If the issue persists, contact Hostek support to investigate potential server-side locks.
Limitations
Repair is primarily used for tables using the MyISAM engine that have detected errors.
Optimize is most effective for MyISAM tables or for tables that have had significant amounts of data deleted or modified.
These actions may take several minutes depending on the size of the table; do not close your browser window until the process is complete.
