HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

Table is marked as crashed and should be repaired

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
crashedmarkedrepairedshouldandtable

Problem

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.

Solution

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

Code Snippets

REPAIR TABLE nagios_servicechecks;

Context

StackExchange Database Administrators Q#43933, answer score: 19

Revisions (0)

No revisions yet.