正常重启后 MySQL 损坏

发布于 2024-08-22 23:39:54 字数 1549 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

榆西 2024-08-29 23:39:54

出于性能原因,对 MyISAM 表的索引更改不会立即刷新到磁盘。如果您的 MySQL 服务器在索引完全刷新到磁盘之前被终止,那么数据(尽快刷新)和索引之间就会存在不一致。在这种情况下,修复模式下的 myisamchk 可以修复索引(与 REPAIR 表几乎相同,但在使用的内存量方面更灵活,因此速度也更灵活)。

Index changes to MyISAM tables are not immediately flushed to disk for performance reasons. If your MySQL server is killed before the indexes are completely flushed to disk, then there is an inconsistency between the data (which is flushed asap) and the indexes. In this case, myisamchk in repair mode can fix the indexes (which is pretty much the same as REPAIR table, but is more flexible in the amount of memory it uses and hence its speed).

陌路黄昏 2024-08-29 23:39:54

MyISAM 因它而臭名昭著,尤其是在旧版本中。这也会影响所有其他引擎,所有引擎都使用 MyISAM 来存储其表信息(信息架构使用 MyISAM)。

原因未知,这是一个非常古老的错误。您可以尝试修复,这是针对此问题创建的解决方法。

祝你好运!

MyISAM is infamous for it, especially in older versions. This also affects all other engines, all engines use MyISAM to store their table information (information schema uses MyISAM).

The cause is unknown, it's a very old bug. You could try REPAIR, a work around created for this problem.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文