How do I solve this MySQL error #126?

Discussion in 'Programming' started by Bishvabis, Mar 5, 2013.

to remove all ads.
  1. Bishvabis

    Bishvabis New Member

    I can't update parts of my shopping cart as I get the following error

    MySQL Error Occurred

    Error Message:
    126: Incorrect key file for table '/tmp/#sql_9ebaf_0.MYI'; try to repair it

    SELECT * FROM CubeCart_options_bot INNER JOIN CubeCart_inventory ON `product` = `productId` ORDER BY `name`, `option_id`, `value_id` ASC

    My host has increased the tmp folder size but I'm still experiencing the problem.

    I read that error #126 means the index file has crashed - I don't know if this is correct or how I can fix it.

    Can anyone help? I need to update my cart but can't do anything until I sort this out.

    Thanks for reading :)
    Last edited: Feb 27, 2014
  2. Edge

    Edge Member

    If you have command line access login into the mysql client using mysql -p and then try 'REPAIR tbl_name USE_FRM;'. If you don't have command line access then PhpMyAdmin has an option to repair the table too.

    if that doesn't work the table may have become too corrupted and you would have to restore it from a backup.

Share This Page