How to repair corrupted mysql table?

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

  1. postcd

    postcd Member

    Messages:
    34
    Likes Received:
    5
    Trophy Points:
    8
    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 Active Member

    Messages:
    762
    Likes Received:
    242
    Trophy Points:
    43
    Have you tried this?
    - https://dev.mysql.com/doc/refman/5.0/en/rebuilding-tables.html
  3. postcd

    postcd Member

    Messages:
    34
    Likes Received:
    5
    Trophy Points:
    8
    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 New Member

    Messages:
    25
    Likes Received:
    2
    Trophy Points:
    3
    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

    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    3
    im command type --auto-repair

Share This Page