MySQL 表的存储引擎不支持修复

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5348703/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 19:10:12  来源:igfitidea点击:

The storage engine for the table doesn't support repair

mysql

提问by AMD

I m getting the error - The storage engine for the table doesn't support repair

我收到错误 - 表的存储引擎不支持修复

while repairing the tables through command - mysqlcheck -u root -p --repair "database"

通过命令修复表时 - mysqlcheck -u root -p --repair "database"

It displays error for 4 tables only out of 106 tables , for rest of the tables it displays OK.

它仅对 106 个表中的 4 个表显示错误,对于其余表,它显示 OK。

Pls help if there is any work around.

如果有任何解决方法,请提供帮助。

Thanks.

谢谢。

回答by Shakti Singh

Myisamengine supports this functionality and I believe these 4 tables are not myisam type.

Myisam引擎支持此功能,我相信这 4 个表不是 myisam 类型。

as manual says :

正如手册所说:

The MyISAM storage engine supports all four maintenance operations, so mysqlcheck can be used to perform any of them on MyISAM tables. Other storage engines do not necessarily support all operations. In such cases, an error message is displayed. For example, if test.t is a MEMORY table, an attempt to check it produces this result:

MyISAM 存储引擎支持所有四种维护操作,因此可以使用 mysqlcheck 对 MyISAM 表执行其中任何一种操作。其他存储引擎不一定支持所有操作。在这种情况下,会显示错误消息。例如,如果 test.t 是一个 MEMORY 表,尝试检查它会产生以下结果:

For further Detail see myisamcheck

有关更多详细信息,请参阅myisamcheck

You can change the engine of tables if they fit for myisam

如果它们适合 myisam,您可以更改表的引擎

回答by Amir Nasir

You cannot repair an InnoDB type table, If you want to repair them you'll have to change the table engine from InnoDB to MyIsam.

您无法修复 InnoDB 类型的表,如果要修复它们,您必须将表引擎从 InnoDB 更改为 MyIsam。

To Do this, follow these simple steps

为此,请按照以下简单步骤操作

  • Open your phpmyadmin
  • Select the database you want to repair.
  • Look for the table(s) with InnoDB type storage engine and note down their names.
  • Now you need to perform an SQL command by clicking on the SQL tab that appears on the top section of that page.
  • Now use the command given below

    ALTER TABLE table_name ENGINE=MyISAM;

  • Replace the table_name with the name of the table you want to change from InnoDB to MyISAM.

  • 打开你的 phpmyadmin
  • 选择要修复的数据库。
  • 查找具有 InnoDB 类型存储引擎的表并记下它们的名称。
  • 现在您需要通过单击出现在该页面顶部的 SQL 选项卡来执行 SQL 命令。
  • 现在使用下面给出的命令

    ALTER TABLE table_name ENGINE=MyISAM;

  • 将 table_name 替换为要从 InnoDB 更改为 MyISAM 的表的名称。

Note: You will have to do the table change one by one. For each time, chose one table and change its engine and so on.

注意:您必须一一进行表格更改。每次选择一张表并更改其引擎等。

Source: Error in mysql repair-The storage engine for the table doesn't support repair while repairing | cPanelWhm.org

来源:mysql 修复错误-表的存储引擎不支持修复时修复 | cPanelWhm.org