Power outage or a buggy mysql version could cause this error to appear:
Stops any php scripts from running etc..
mysql: Table ‘database/table’ is marked as crashed and should be repaired
To fix this, I ran this command via a shell:
$ mysqlcheck --all-databases -uroot -p
enter the root password, and it goes through checking all database tables for issues. hopefully fixing along the way ![🙂](https://s.w.org/images/core/emoji/2/svg/1f642.svg)
You may have to change root to whatever database username you have available (ie: whatever you use to login to phpmyadmin)
It any show the error, run this sql:
$ mysql -uroot -p databasename REPAIR TABLE tablename;
Or just jump into phpmyadmin and click on repair