Table corruption in MySQL is a very frequent issue, which primarily happens due to failed/forced transactions.

MySQL supports two different types of engines: MyISAM and InnoDB.
It is to be noted that the repair utility provided by MySQL can only be used for tables using MyISAM, while InnoDB crashed tables cannot be repaired using the repair tool.

The commands to repair MyISAM tables/databases in MySQL are as follows:

To check and repair all databases on the server:

mysqlcheck -A  

Or to check and repair only one specific database:

mysqlcheck -r database_name

(where database_name is the name of the database to be checked/repaired)

Another thing to be noted here is that the -r option can fix everything except unique keys that aren't unique.

cPanel provides an option to repair tables from the interface itself.
This can be done via cPanel => MySQL Databases => Modify Databases => Check DB.

However, please note that this will work for MyISAM tables only. This option triggers the same commands mentioned above via backend.

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • MySQL, phpMyAdmin
  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

 How to automate MySQL backup using R1soft-Idera backup

Plain R1soft-Idera backup does not directly support mySQL database backup. But with this...

 How to Backup Your MySQL Database Using PHP

This simple PHP script will provide a full dump of your MySQL database.You need to provide...

 Come effettuare il backup di un database per mezzo di phpMyAdmin

PhpMyAdmin permette di effettuare il backup ("dump") di un database MySQL in maniera molto...

 How to import a db dump in a database with different name

 How to generate random string in MySQL

If you need to create random string (i.e., to be used as password) in MySQL, you can easily do it...