将表类型从 MyISAM 更改为 InnoDB

发布于 2024-11-26 23:29:22 字数 113 浏览 0 评论 0原文

我想知道如果我将一些表从 MyISAM 转换为 InnoDB,会导致数据损坏吗?

我需要将一些表转换为 InnoDB,以便我可以使用事务,但它们保存着非常重要的数据,所以我不确定是否应该进行转换。

I wonder if I convert some tables from MyISAM to InnoDB, will it cause any corruptions of data?

I am in need to convert some tables to InnoDB so I can use transaction, but they are holding very important data so I'm not sure if I should do the conversion or not.

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

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

发布评论

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

评论(3

情痴 2024-12-03 23:29:22

虽然更改表的数据库引擎是一项简单而常见的任务,不会导致损坏,但保证不会发生损坏的唯一方法是首先进行自己的备份。

While changing the database engine of a table is a simple and common task which should cause no corruption, the only way to guarantee no corruption can occur is to first make your own backup.

负佳期 2024-12-03 23:29:22

当然,数据丢失的风险始终存在;但总的来说我认为它相当低。

当更改表时,MySQL 将为大多数操作(包括此操作)处理临时副本。因此,如果操作失败,也不会损害您的原始表。

无论如何,拥有备份会让你感觉更好......

Of course there is always a risk of data loss; but overall I would consider it rather low.

When altering a table MySQL will work on a temporary copy for most operations, including this one. So if the operation fails it will not harm your original table.

And having a backup will make you feel better anyway...

亣腦蒛氧 2024-12-03 23:29:22

MySQL 的设计使得表类型之间的转换非常稳健。

除了进行转换所需的时间之外,数据面临的唯一风险是数据库运行时的正常背景风险。也就是说,无论如何你都应该有备份,如果不丢失任何重要的东西,你可能应该有复制。

MySQL has designed it so that converting between table types is designed to be robust.

The only risk to your data, other than the time it takes to do the conversion, is the normal background risk that you would have at any time your database is running. That is to say, you should always have backups anyway, and if not losing anything is important, you should probably have replication.

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