How to repair corrupted mysql table?

Discussion in 'Web Server' started by postcd, May 2, 2014.

  1. postcd

    postcd Member

    Joined:
    Apr 16, 2014
    Messages:
    139
    Likes Received:
    10
    Hello,

    im having command to check and repair (at least i believe) all mysql tables in all databases:

    but on my website i got error message an table is crashed, so i run above command but it just returned like:

    So i want to ask how i can repair that table using mysqlcheck or any other linux command?

    Its possible to do via phpmyadmin but i need linux command.

    Thx


     
  2. arochester

    arochester Super Moderator Staff Member

    Joined:
    Nov 23, 2012
    Messages:
    1,152
    Likes Received:
    380
    Have you tried this?
    - https://dev.mysql.com/doc/refman/5.0/en/rebuilding-tables.html
     
  3. postcd

    postcd Member

    Joined:
    Apr 16, 2014
    Messages:
    139
    Likes Received:
    10
    as You can see, im using "--auto-repair " operator to the "mysqlcheck" command.
    How can i add yours mentioned repair command into my command so its repaired automatically when table is corupt?
     
  4. laurentv

    laurentv Member

    Joined:
    Aug 11, 2013
    Messages:
    30
    Likes Received:
    2
    if MyISAM:
    stop mysql and launch :
    myisamchk -r -v -f --sort_buffer_size=128M --key_buffer_size=128M /path/to/your/base/table.MYI
     
  5. taiavatar

    taiavatar New Member

    Joined:
    May 7, 2014
    Messages:
    9
    Likes Received:
    1
    im command type --auto-repair
     

Share This Page