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.
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.
“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:
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;
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With