My 2 paisas

Posts Tagged ‘repiar

For some very easy repairs, this utility can be used.

myisamchk is an table-maintainence utility. It is used to repair corrupted mysql tables.

First, try myisamchk -r -q tbl_name (-r -q means “quick recovery mode”). This attempts to repair the index file without touching the data file. If the data file contains everything that it should and the delete links point at the correct locations within the data file, this should work, and the table is fixed. Start repairing the next table. Otherwise, use the following procedure:


Make a backup of the data file before continuing.

Use myisamchk -r tbl_name (-r means “recovery mode”). This removes incorrect rows and deleted rows from the data file and reconstructs the index file.

If the preceding step fails, use myisamchk –safe-recover tbl_name. Safe recovery mode uses an old recovery method that handles a few cases that regular recovery mode does not (but is slower).



Links that I liked to save

Blog Stats

  • 44,458 hits