Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Table is marked as crashed and should be repaired

People also ask

Why table is marked as crashed and should be repaired?

Low disk space could be a reason for MySQL table being marked as “crashed”. When you have low space on your disk, some of the tables in the database may get crashed. It usually happens when you get space issues on the part of the hard disk where your database is stored.

Is marked as crashed and should be repaired workbench?

The MySQL error “MySQL is marked as crashed and should be repaired” may occur suddenly while you are accessing MySQL. The frequency of the error is more after the forced shutdowns of the MySQL Server. Whatever be the reason, you cannot access or use your MySQL tables anymore as it has been completely crashed.

Is marked as crashed and last?

“MySQL Table is marked as crashed and last (automatic?) Repair failed”. The error can be caused due to many reasons including zero disk space available on the server, a hard reset of server, forced shutdown of MySQL, or MySQL process crashing due to some reason.


Here is where the repair button is:

alt text


Run this from your server's command line:

 mysqlcheck --repair --all-databases

I had the same issue when my server free disk space available was 0

You can use the command (there must be ample space for the mysql files)

REPAIR TABLE `<table name>`;

for repairing individual tables


Connect to your server via SSH

then connect to your mysql console

and

USE user_base
REPAIR TABLE TABLE;

-OR-

If there are a lot of broken tables in current database:

mysqlcheck -uUSER -pPASSWORD  --repair --extended user_base

If there are a lot of broken tables in a lot of databases:

mysqlcheck -uUSER -pPASSWORD  --repair --extended -A

When I got this error:

#145 - Table '.\engine\phpbb3_posts' is marked as crashed and should be repaired

I ran this command in PhpMyAdmin to fix it:

REPAIR TABLE phpbb3_posts;