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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content