How to recover crashed table on shared host?

Discussion in 'Site & Server Administration' started by q7m, Jan 14, 2016.

  1. #1
    Hi,

    One of my database tables crashed. When I try to access it via Phpmyadmin I get this error:
    #144 - Table './z4m_kizifriv/items' is marked as crashed and last (automatic?) repair failed

    The "repair table" command gives the following error:
    Can't create new tempfile: './z4m_kizifriv/items.TMD'

    In Phpmyadmin, the table appears to be "in use", this is probably why the "repair table" doesn't work.

    As my host is a shared one, I have opened a support ticket, but I got no help from the support staff. They don't reply on the ticked from about a week, even I contacted them few times via live chat. In other words, Arvixe support is AWFUL!!!

    Do you have any suggestion about how can I get this fixed?

    Thanks!
     
    q7m, Jan 14, 2016 IP
  2. pwhrita

    pwhrita Active Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #2
    You can attempt to repair whole database from the server itself but you will want to have your hosting provider to do it. The command that can be used is myisamchk -r dbname
     
    pwhrita, Jan 15, 2016 IP
  3. bjdea1

    bjdea1 Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    I'd also ask your host for a copy of your last backup, prior to the crash. Or if you can retrieve a backup yourself via a control panel - I would recommend doing this as soon as possible. The longer time passes the higher the chance no worthwhile backup will be available.
     
    bjdea1, Jan 25, 2016 IP
  4. InWebKart

    InWebKart Peon

    Messages:
    4
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    3
    #4
    You need your web host to repair your table (This requires MYSQL root access and actual Linux root access)
    In this example : mydb1 is your DB in which my_crashed_table is your table
    Using mysql root
    mysql> use mydb1;
    mysql>repair table  my_crashed_table;
    Code (markup):
    If this did not fix :
    Using Linux root
    cd /var/lib/mysql (or where your current Database files are located)
    cd mydb1
    myisamchk -r -f  my_crashed_table.MYI
    Code (markup):
     
    InWebKart, Jan 26, 2016 IP
  5. sibsoft

    sibsoft Well-Known Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    128
    Digital Goods:
    1
    #5
    Check disk space of your virtual server instance (maybe it can't create new temp file because there's no free space).
     
    sibsoft, Jan 27, 2016 IP