MySQL table is marked as crashed and last (automatic?) repair failed

前端 未结 9 1654
半阙折子戏
半阙折子戏 2021-01-29 18:01

I was repairing this table suddenly server hanged and when I returned back all tables are ok but this one showing \'in use\' and when I try to repair it doesn\'t proceed.

<
相关标签:
9条回答
  • 2021-01-29 18:23

    This is a 100% solution. I tried it myself.

    myisamchk -r -v -f --sort_buffer_size=128M --key_buffer_size=128M /var/lib/mysql/databasename/tabloname

    0 讨论(0)
  • 2021-01-29 18:27

    I tried the options in the existing answers, mainly the one marked correct which did not work in my scenario. However, what did work was using phpMyAdmin. Select the database and then select the table, from the bottom drop down menu select "Repair table".

    • Server type: MySQL
    • Server version: 5.7.23 - MySQL Community Server (GPL)
    • phpMyAdmin: Version information: 4.7.7
    0 讨论(0)
  • 2021-01-29 18:30

    Go to data_dir and remove the Your_table.TMP file after repairing <Your_table> table.

    0 讨论(0)
提交回复
热议问题