List:General Discussion« Previous MessageNext Message »
From:Rick James Date:May 11 2012 2:56pm
Subject:RE: How to quickly detect if there are any crashed tables
View as plain text  
Much faster:  SHOW TABLE STATUS -- It will have NULLs for the tables that really need REPAIR.  (Those that were "not properly closed" don't have to be REPAIRed.)

If you system is new enough, you can find the list of databases (TABLE_SCHEMA) from `information_schema`.

In the long run, consider switching to InnoDB; it is self-repairing.

> -----Original Message-----
> From: Adrian Fita [mailto:adrian.fita@stripped]
> Sent: Thursday, May 10, 2012 11:40 AM
> To: mysql@stripped
> Subject: How to quickly detect if there are any crashed tables
> 
> Hi.
> 
> I have several hundreds of databases with MyISAM tables in a server and
> after a power outage, I have to manually repair them with mysqlcheck.
> Sometimes I forget and it's not nice. So I am thinking of making a
> Nagios plugin to check if there are any crashed tables that need
> repairing.
> 
> I tried using "mysqlcheck --all-databases --quick --check --check-only-
> changed --fast", but it still took around 2h to run.
> 
> I also tried using myisamchk with "find /var/lib/mysql -name '*.MYI'
> -exec myisamchk --silent --fast '{}' \;", but still, after 15 minutes,
> it hasn't finished.
> 
> I am looking for a solution that will give me an answer in at least 3-4
> minutes.
> 
> I apreciate any sugestions you might have.
> 
> Thanks,
> --
> Fita Adrian
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
Thread
How to quickly detect if there are any crashed tablesAdrian Fita10 May
  • Re: How to quickly detect if there are any crashed tablesMihail Manolov10 May
    • Re: How to quickly detect if there are any crashed tablesAdrian Fita10 May
      • Re: How to quickly detect if there are any crashed tablesMihail Manolov10 May
        • RE: How to quickly detect if there are any crashed tablesSteven Staples10 May
          • Re: How to quickly detect if there are any crashed tablesAdrian Fita11 May
  • RE: How to quickly detect if there are any crashed tablesRick James11 May