Before you begin
You will need:
A Hostek account with access to the database management tools.
The specific name of the database and the table that requires repair.
Repairing a table via phpMyAdmin
If you prefer a graphical interface, you can repair a table using phpMyAdmin.
Log in to your hosting control panel and open phpMyAdmin.
Select the database containing the corrupted table from the list on the left.
Click on the specific table name that is showing as "in use" or "crashed."
Click the Operations tab at the top of the page.
Locate the Table maintenance section (or similar section depending on your version).
Click the Repair table link next to the specific table name.
Repairing a table via command line
If you have access to a command-line interface, you can use the mysqlcheck utility to repair tables.
Note: This method is typically used by advanced users or when the table is too large to process efficiently through a web interface.
Connect to your server via SSH.
Run the following command to repair a specific table:
mysqlcheck -u [username] -p --repair [database_name]/[table_name]
Replace
[username]with your database user,[database_name]with the name of your database, and[table_name]with the name of the table.Enter your password when prompted.
Confirm the result
The table will no longer show a "crashed" or "in use" status in phpMyAdmin.
You can successfully run a
SELECTquery on the table to view its data.The table is accessible by your website or application.
If the table remains inaccessible after repair
If the table still shows as crashed or your application cannot connect to it after a repair attempt, the table may have severe structural damage.
Export the data from the table (if possible) using the Export tab in phpMyAdmin.
Drop the corrupted table.
Re-import the data into a newly created table with the correct structure.
If you cannot export the data, contact Hostek support to investigate the specific error.
Limitations
Repairing a table is a local fix for data corruption. If a table crashes frequently, it may indicate an issue with the application's code, a full disk, or a hardware-level issue on the server. If the problem persists after a repair, please contact Hostek support.
