How to troubleshoot and repair corrupted MySQL tables using myisamchk?

Solution Unverified - Updated -

Issue

  • MySQL database is corrupted, application log shows:.
undef error - DBD::mysql::db selectrow_array failed: Table 'xxxx_test' is marked as crashed and should be repaired [for Statement "SELECT LENGTH(thedata)
FROM xxxx_test   WHERE id = ?"] at  file/index.php  line 344 
  • Unable to start-up service due to database table corruption

Environment

  • Redhat Enterprise Linux Server
  • MySQL server

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.