Tech4Him – Technology with Integrity

A Christian technology chaos wrangler and his thoughts

MySQLCheck For Quick Repair

Posted by Tom On February - 15 - 2010

Thanks to this tip on the Taragana blog, I was introduced to the mysqlcheck command. In a pinch, the following command will check, repair and optimize all tables in all databases on your MySQL server instance.

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

mysqlcheck is available in MySQL 3.23.38 and later.

The official documentation for mysqlcheck says: “The mysqlcheck client performs table maintenance: It checks, repairs, optimizes, or analyzes tables.” Now, this must be run on a MySQL instance that is currently running, unlike the myisamchk tool. So, you may want to stop all access to your instance. If you are using it for websites, perhaps kill HTTPD for a few minutes some other means.

Popularity: 3% [?]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • PDF
  • RSS
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Leave a Reply