Common SQL Errors

MySQL Error 1194: ER_CRASHED_ON_USAGE - How to Fix and Prevent

Galaxy Team
August 6, 2025

MySQL reports Error 1194 when a MyISAM or Aria table is flagged as crashed and locked for safety until it is repaired or restored.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL Error 1194?

MySQL Error 1194: ER_CRASHED_ON_USAGE occurs when a table file is corrupted and MySQL blocks access. Repair the table with REPAIR TABLE or myisamchk, then verify hardware and backups to prevent recurrence.

Error Highlights

Typical Error Message

Table '%s' is marked as crashed and should be repaired

Error Type

Table Error

Language

MySQL

Symbol

ER_CRASHED_ON_USAGE

Error Code

1194

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 1194 (ER_CRASHED_ON_USAGE)?

MySQL throws Error 1194 with the message "Table 'tbl' is marked as crashed and should be repaired" when the handler detects structural corruption inside a MyISAM or Aria data or index file. The server halts reads and writes to protect data integrity.

The error commonly follows an unclean shutdown, power loss, filesystem issues, or hardware faults.

Resolving it fast matters because any application that uses the damaged table will fail, causing downtime and possible data loss.

What Causes This Error?

Unexpected server crashes or power outages interrupt write operations, leaving table files in an inconsistent state that MySQL marks as crashed on the next start.

Disk problems such as bad sectors, controller failures, or a full partition can corrupt MyISAM .MYD or .MYI files, leading to Error 1194 when the engine touches the file.

Improper server kills (kill -9) or forced reboots prevent buffered data from flushing to disk, corrupting indexes and triggering the error on subsequent use.

How to Fix MySQL Error 1194

Start by backing up the affected table files (.MYD, .MYI, .frm) or the full database directory.

A backup lets you revert if the repair fails.

Run CHECK TABLE tbl EXTENDED to confirm corruption type. If reported as crash, execute REPAIR TABLE tbl QUICK or REPAIR TABLE tbl to rebuild indexes and data pointers.

If the server cannot open the table, stop MySQL and use myisamchk -r /path/tbl.MYI for an offline repair.

Restart the server and re-run CHECK TABLE to confirm success.

Common Scenarios and Solutions

After a power outage on on-prem servers, several MyISAM tables throw Error 1194. Batch repair with mysqlcheck -r --databases db1 db2 restores them quickly.

Cloud disks reach 100 percent capacity, and a single reporting table crashes.

Free space, run REPAIR TABLE, and move the table to InnoDB to avoid future disk-full crashes.

Best Practices to Avoid This Error

Use InnoDB for transactional tables; it is crash-safe and rarely corrupts on power loss compared to MyISAM.

Enable UPS power, graceful shutdown scripts, and fsync-friendly settings to prevent abrupt terminations that corrupt MyISAM files.

Schedule mysqlcheck --auto-repair in cron and monitor MySQL error logs to detect small corruptions before they escalate into Error 1194 events.

Related Errors and Solutions

Error 1195 signals MyISAM corruption discovered while opening; fix paths mirror Error 1194.

Error 145 (Table was marked as crashed) occurs on MyISAM tables and uses the same REPAIR TABLE workflow.

.

Common Causes

Related Errors

FAQs

Does Error 1194 affect InnoDB tables?

No. The error is raised mostly by MyISAM or Aria tables because InnoDB has crash recovery.

Is data lost when a table is crashed?

Usually no. REPAIR TABLE rebuilds indexes without touching data blocks. Severe corruption may require restoring from backups.

Can I prevent table crashes permanently?

Yes. Move critical tables to InnoDB, ensure clean shutdowns, monitor disk health, and keep regular backups.

How does Galaxy help here?

Galaxy surfaces MySQL error logs in its editor, suggests REPAIR commands via AI Copilot, and lets teams version the recovery SQL for audit.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo