Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Check this page: Table Maintenance Statements I guess your table uses MyISAM engine and needs REPAIR. – ypercubeᵀᴹ Jun 6 '13 at 8:37
thanks, repaired :) – Ram S Jun 18 '13 at 5:45
I am not that good at Linux, but I have read about a SQL Database Recovery Tool by SysInfoTools. I guess it works for Windows OS only. But there are many commercial wares available which you can go for. Else you may see if the tool I mentioned is available for Linux or not. – Stephen Jul 23 '14 at 5:49
The tool you mention is for Microsoft SQL Server. The question is about MySQL. Please don't answer questions here with just product recommendations unless you're absolutely certain they fix the issue in the question. – Mat Jul 23 '14 at 5:56

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

share|improve this answer
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 script found in /usr/local/nagiosxi/scripts/. Make sure you run it as root.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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