简体   繁体   中英

What's the safest way to convert table with InnoDB to MyISAM?

My database is currently using the InnoDB engine. Now I want to add the fulltext search feature, which is why I want to convert my tables to MyISAM. But doing so breaks all foreign keys. How can I change my table engines to MyISAM safely?

How can I use SELECT...JOIN after I change my tables to the MyISAM engine?

ALTER TABLE jobs ENGINE = MyISAM;
Cannot delete or update a parent row: a foreign key constraint fails

我建议你转储数据库,将该文件中的所有文本从InnoDB更改为MyISAM,然后加载修改后的文件

As I know, MyISAM doesn't supports foreign keys (compare the features offered by InnoDB vs the features of MyISAM ). MySQL tries to tell you that you have to drop every foreign key constraint that references your jobs table before changing its engine to MyISAM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM