Got error 127 from table handler

From XMBdocs
Revision as of 17:24, 26 December 2017 by Miqrogroove (talk | contribs) (Created page with "This "How To" will give you some ideas on the cause and solution to the "Got error 127 from table handler" error. ===Scenario=== I went to my forums and saw this error "Got e...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This "How To" will give you some ideas on the cause and solution to the "Got error 127 from table handler" error.

Scenario

I went to my forums and saw this error "Got error 127 from table handler"!! What is that!

Error 127 is triggered when there is enough corruption in a table to cause MySQL to not be able read the data properly. Some of the causes of this may include:

  • The mysqld process being killed in the middle of a write.
  • Unexpected shutdown of the computer (for example, if the computer is turned off).
  • A hardware error.
  • You are using an external program (like myisamchk) on a live table.
  • A software bug in the MySQL or MyISAM code.

If you still have access to your Administration Panel

Go to Administration Panel / Upgrade

Paste the following SQL commands (between the dotted lines) into the text box and click "Submit Changes"

(Note: make sure that your tables use the prefix 'xmb_' if not change the commands below to reflect the prefix you use. You can determine your $tablepre by checking the "Table Settings" in your config.php file)

(If you get an error when running both the REAIR and OPTIMIZE lines together - try running them separately.)

REPAIR TABLE xmb_attachments, xmb_banned, xmb_buddys, xmb_favorites, xmb_forums, xmb_members, xmb_posts, xmb_ranks, xmb_restricted, xmb_settings, xmb_smilies, xmb_templates, xmb_themes, xmb_threads, xmb_u2u, xmb_whosonline, xmb_words;

OPTIMIZE TABLE xmb_attachments, xmb_banned, xmb_buddys, xmb_favorites, xmb_forums, xmb_members, xmb_posts, xmb_ranks, xmb_restricted, xmb_settings, xmb_smilies, xmb_templates, xmb_themes, xmb_threads, xmb_u2u, xmb_whosonline, xmb_words;

That should take care of the damage to the database. Note: Some data loss is to be expected from the "error 127 from table handler" error. It is usually minimal and may involve a few threads (the ones that may have been corrupt) turning up as missing.

If you can not access your Administration Panel

To repair the tables from phpMyAdmin:
Access your ~MySQL sectin of your site's control panel (like CPanel, Plesk, Ensim, etc...) and click on the phpMyAdmin link.
Once in phpMyAdmin select your forum's database from the menu on the left.
Now click on the "SQL" tab (above the tables)
Paste the following SQL commands (between the dotted lines) in to the text box and click "Go".

(Note: make sure that your tables use the prefix 'xmb_' if not change the commands below to reflect the prefix you use. You can determine your $tablepre by checking the "Table Settings" in your config.php file)

(If you get an error when running both the REAIR and OPTIMIZE lines together - try running them separately.)

REPAIR TABLE xmb_attachments,xmb_banned,xmb_buddys,xmb_favorites,xmb_forums,xmb_members,xmb_posts,xmb_ranks,xmb_restricted,xmb_settings,xmb_smilies,xmb_templates,x mb_themes,xmb_threads,xmb_u2u,xmb_whosonline,xmb_words

OPTIMIZE TABLE xmb_attachments, xmb_banned, xmb_buddys, xmb_favorites, xmb_forums, xmb_members, xmb_posts, xmb_ranks, xmb_restricted, xmb_settings, xmb_smilies, xmb_templates, xmb_themes, xmb_threads, xmb_u2u, xmb_whosonline, xmb_words

Note: Some data loss is to be expected from the "error 127 from table handler" error. It is usually minimal and may involve a few threads (the ones that may have been corrupt) turning up as missing.

Final Notes
Hope this "How To" helps you to cope with the "Got error 127 from table handler" error. IF the above methods do not correct the error you will need to contact your host's support department for further assistance.
Thanks
Daf