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

前端 未结 9 1845
半阙折子戏
半阙折子戏 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:08

    If your MySQL process is running, stop it. On Debian:

    sudo service mysql stop
    

    Go to your data folder. On Debian:

    cd /var/lib/mysql/$DATABASE_NAME
    

    Try running:

    myisamchk -r $TABLE_NAME
    

    If that doesn't work, you can try:

    myisamchk -r -v -f $TABLE_NAME
    

    You can start your MySQL server again. On Debian:

    sudo service mysql start
    

提交回复
热议问题