MySQL table is marked as crashed and last (automat

2020-05-10 23:35发布

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.

ERROR 144 - Table './extas_d47727/xzclf_ads' is marked as crashed and last (automatic?) repair failed

What can I do to repair it?

标签: mysql repair
8条回答
姐就是有狂的资本
2楼-- · 2020-05-11 00:06

I needed to add USE_FRM to the repair statement to make it work.

REPAIR TABLE <table_name> USE_FRM;
查看更多
ゆ 、 Hurt°
3楼-- · 2020-05-11 00:07

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
查看更多
爷的心禁止访问
4楼-- · 2020-05-11 00:15

If it gives you permission denial while moving to /var/lib/mysql then use the following solution

$ cd /var/lib/
$ sudo -u mysql myisamchk -r -v -f mysql/<DB_NAME>/<TABLE_NAME>
查看更多
▲ chillily
5楼-- · 2020-05-11 00:17

Try running the following query:

repair table <table_name>;

I had the same issue and it solved me the problem.

查看更多
神经病院院长
6楼-- · 2020-05-11 00:20

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

查看更多
孤傲高冷的网名
7楼-- · 2020-05-11 00:25

I got myisamchk: error: myisam_sort_buffer_size is too small as error.

The solution

myisamchk -r -v mysql/<DB_NAME>/<TABLE_NAME> --sort_buffer_size=2G
查看更多
登录 后发表回答