Take the 2-minute tour ×
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.

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 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 at 5:56

1 Answer 1

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

http://php.about.com/od/mysqladministration/qt/repair_mysql.htm

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 at 1:01
    
@SamWatkins Thanks same has been changed.. –  Karthick Oct 25 at 11:17

Your Answer

 
discard

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.