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.


2 Answers 2


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; Commented Sep 30, 2014 at 1:01
  • @SamWatkins Thanks same has been changed..
    – Karthick
    Commented Oct 25, 2014 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.

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