500 – An error has occurred!

DB function failed with error number 126
Incorrect key file for table ‘/tmp/#sql_54d6_0.MYI’; try to repair it SQL=SELECT c.*, g.name AS groupname, cc.title AS name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author FROM jos_content AS c LEFT JOIN jos_categories AS cc ON cc.id = c.catid LEFT JOIN jos_sections AS s ON s.id = c.sectionid LEFT JOIN jos_groups AS g ON g.id = c.access LEFT JOIN jos_users AS u ON u.id = c.checked_out LEFT JOIN jos_users AS v ON v.id = c.created_by LEFT JOIN jos_content_frontpage AS f ON f.content_id = c.id WHERE c.state != -2 ORDER BY section_name , section_name, cc.title, c.ordering LIMIT 0, 20

Have you ever got this? Joomla users may have seen it. Is Joomla CMS is not stable enough? Nope! This error is not caused by Joomla.

This error is come from MySQL. If you read the error message above, you may see there are several tables are involved:

  • jos_content
  • jos_categories
  • jos_sections
  • jos_groups
  • jos_users
  • jos_content_frontpage

The possibility is one of the tables above has been damaged by something. Failure on electricity or something else.

The solution is you need to repair one of those tables by using command REPARO, ups sorry, that’s spell for repairing stuff in Harry Potter story :D. This is the command: REPAIR TABLE. This is how to use it:

repair table jos_content;
repair table jos_categories;
repair table jos_sections;
repair table jos_groups;
repair table jos_users;
repair table jos_content_frontpage;

If the problem still exist although you have repaired all those tables, another possibility is your MySQL temporary directory. You can’t write that directory (maybe full).

Related posts:

  1. Joomla Database Crash
  2. WordPress Error: open_basedir restriction in effect

Tags: , , , , ,

5 Responses to “Joomla DB Function Failed With Error Number 126”

  1. Just woke up this morning to a major client not having access to their site for this exact reason. I thought I had been hacked. This post saved the day in about 8 minutes (mainly because I couldn’t remember the DB password off the top of my head.)

    Thank you so much.

  2. @jake
    You’re welcome

    I’m glad to hear that your problem had been solved :)

  3. http://www.tawkle.com

  4. Thanks! This post save me a lot of time.

  5. excellent to understand, happy I found it

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>