Are there any pitfalls / things you need to know when changing from MyISAM to InnoDB

后端 未结 6 1052
遇见更好的自我
遇见更好的自我 2021-02-01 11:02

One of my projects use the MyISAM engine in MySQL, but I\'m considering changing it to InnoDB as I need transaction support here and there.

  • What should I look at o
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-01 11:31

    There is one big caveat. If you get any kind of hardware failure (or similar) during a write, InnoDB will corrupt tables.

    MyISAM will also, but a mysqlcheck --auto-repair will repair them. Trying this with InnoDB tables will fail. Yes, this is from experience.

    This means you need to have a good regular data backup plan to use InnoDB.

提交回复
热议问题