Reparar tablas en MySQL

Table corruption in MySQL is a very frequent issue. This primarily happens due to failed/forced transactions. MySQL primarily supports two type 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. Crashed tables using InnoDB cannot be repaired using the repair tool. Now, the commands to repair tables/databases in MySQL are as follows:

mysqlcheck -A  [To check and repair all databases on the server]

mysqlcheck -r database_name [where database_name is the name of the database to be checked]

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

Control panels like cPanel provide an option to repair tables from the interface itself. In cPanel, 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.

The scope of this article is only to repair the tables using MyISAM.

  • MySQL
  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

Estructura de directorios y archivos - Linux

Directorio / Estructura de carpetasDe entre los varios directorios que se encuentran dentro de su...

Errores PHP require, require_once

Si tiene un error que se parece a uno de estos... Warning:...

PHP Parse error: syntax error, unexpected $end

Este error es causado por la falta de } usado en PHP para denotar el contenido que pertenece a...

How to drop tables from a database in phpMyAdmin

This article will demonstrate how to drop (permanently delete) tables from a database in...

How to drop tables from a database in phpMyAdmin

This article will demonstrate how to drop (permanently delete) tables from a database in...

Powered by WHMCompleteSolution