How to repair MySQL table

From Kolmisoft Wiki
Revision as of 08:48, 7 November 2008 by Admin (talk | contribs) (New page: If you can't open GUI and you see something similiar in your /home/mor/log/production.log: ActiveRecord::StatementInvalid (Mysql::Error: Table 'calls' is marked as crashed and should be r...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

If you can't open GUI and you see something similiar in your /home/mor/log/production.log:

ActiveRecord::StatementInvalid (Mysql::Error: Table 'calls' is marked as crashed and should be repaired: SELECT * FROM calls WHERE (dst_device_id =189 AND disposition != 'ANSWERED' AND calldate BETWEEN '2008-11-07 00:00:00' AND '2008-11-07 23:59:59') ORDER BY calldate DESC):

That means table 'calls' should be repaired. Log in into mysql console, choose your mor database (usually mor) and do:

 repair table damaged_table;
 <ENTER>

Thats it, table should be repaired now.

 mysql> repair table calls;
 +-----------+--------+----------+----------+
 | Table     | Op     | Msg_type | Msg_text |
 +-----------+--------+----------+----------+
 | mor.calls | repair | status   | OK       |
 +-----------+--------+----------+----------+
 1 row in set (1 min 18.25 sec)
 mysql> exit
 Bye