MySQL Error - Table tablename is marked as crashed and should be repaired Print

  • 0

If you see the MySQL Error "Table tablename is marked as crashed and should be repaired" you can do the following to repair your databases:

If your server is running cPanel:

service chkservd stop

service mysql stop

cd /var/lib/mysql/

find . -type f | grep -i MYI|xargs myisamchk --fast --force --medium-check --backup --safe-recover --sort-index -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M -t /root/

service mysql start

service chkservd start

If your VPS is running Plesk:

service mysqld stop

cd /var/lib/mysql/

find . -type f | grep -i MYI|xargs myisamchk --fast --force --medium-check --backup --safe-recover --sort-index -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M -t /root/

service mysqld start


Was this answer helpful?

« Back