I have MySQL and Nagios installed Linux PC (Centos5.5)

I have wrote some script to fetch the data from Nagios to Mysql DB (Exactly fetch data in Table)

The data fetching working properly (confirmed with 'COUNT' cmd)

The problem when i run the following command its through error as below,

mysql> select * from nagios_servicechecks;

ERROR 1194 (HY000): Table 'nagios_servicechecks' is marked as crashed and should be repaired

Except this command, all other commands working fine.


Please try the below query,

REPAIR TABLE nagios_servicechecks;

Try the above query in terminal or check the below link to repair table or databases via phpmyadmin


  • correction, the quote marks are not required, and there should be a semicolon at the end, i.e.: REPAIR TABLE nagios_servicechecks; – Sam Watkins Sep 30 '14 at 1:01
  • @SamWatkins Thanks same has been changed.. – Karthick Oct 25 '14 at 11:17

A nagiosxi specific method that worked for me was running their repair_databases.sh script found in /usr/local/nagiosxi/scripts/. Make sure you run it as root.

protected by Community Mar 29 '18 at 8:55

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.