Don’t freak out if your Magento is not working and because of the following error message.
1 |
SQLSTATE[HY000]: General error: 145 Table './magento/log_visitor_info' is marked as crashed and should be repaired |
The reason of a crashed MySQL table is mostly related to a server issue. For example:
- Any kind of hard-disk failure
- Sudden server reboot (power outage in hosting)
- Hard server reboot (ACPI shutdown)
In most cases you can repair the affected table with a simple repair command, which comes with MySQL.
1 2 3 4 5 6 7 |
mysql> repair table log_visitor_info; +-----------------------+--------+----------+----------+ | Table | Op | Msg_type | Msg_text | +-----------------------+--------+----------+----------+ | magento.log_visitor_info | repair | status | OK | +-----------------------+--------+----------+----------+ 1 row in set (0.54 sec) |
This command looks pretty easy and safe, but keep in mind that you should always create a backup before you change anything in your database, because probably more MySQL tables are affected.