Re: Convert InnoDB to MyiSAM
Posted by: Rick James
Date: May 23, 2016 09:10AM

First, I must ask "why" you want to convert to MyISAM. There are very few use cases where MyISAM might be better than InnoDB.

As for FOREIGN KEYs, ... It implicitly creates an index; you probably need the index after the conversion, so make sure it is still there after the conversion.

Plan A: Use mysqldump to dump the schema and data. Edit that output to remove "FOREIGN KEY ..." and change "ENGINE=...". Then load the file using "mysql".

Plan B:
CREATE TABLE t_myisam LIKE t_innodb;
ALTER TABLE
DROP FOREIGN KEY ...,
...,
ENGINE=InnoDB;

(I may have left out some details, but hopefully I have pointed you the right direction.)

Options: ReplyQuote


Subject
Written By
Posted
May 19, 2016 12:55PM
Re: Convert InnoDB to MyiSAM
May 23, 2016 09:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.