Skip to content
FREE & OPEN SOURCE Million Dollar Script is a free WordPress plugin for sponsor walls, campaign grids, fundraiser boards, and premium add-on workflows.

Legacy support, updated

Recover from MySQL error 145 for a .MYI table

MySQL error 145 means a MyISAM table was marked as crashed and should be repaired. A .MYI filename identifies a MyISAM index file; this procedure does not apply to InnoDB tables.

Applies to
Legacy MyISAM databases, including older standalone MDS 2 installations
Reviewed
First published

Protect the data first

  1. Stop writes to the affected application when practical.
  2. Create and verify a restorable database backup before attempting a repair.
  3. Record the complete error, affected database and table, MySQL version, and recent shutdown or storage events.

Confirm the table engine

Proceed with a MyISAM repair only when the engine is MyISAM and the check reports corruption. REPAIR TABLE is not a general repair command for InnoDB.

Run with an account allowed to inspect the affected database

SHOW TABLE STATUS FROM your_database LIKE 'config';
CHECK TABLE your_database.config;

Use the supported recovery path

  • On managed hosting, use the provider’s database repair workflow or open a support request. This keeps backups, privileges, and service state under the provider’s control.
  • A database administrator can use REPAIR TABLE for a confirmed MyISAM table after the backup is secured.
  • Do not run myisamchk against table files while MySQL is actively using them. The official recovery procedure requires careful server-state and file-permission handling.
  • Repeated corruption calls for investigation of abrupt shutdowns, disk health, resource exhaustion, and the reason the application still depends on MyISAM.