Mysql – How to convert a MyISAM .sql dump into InnoDB

dumpMySQLsql

Can I convert dumped .sql MyISAM database into InnoDB engine before importing it to my MySQL server? Unfortunately, importing the current .sql file takes ages to complete.

Best Answer

You can use sed to search for engine myisam and replace it with engine innodb.

sed -e 's/engine myisam/engine innodb/g' file.sql > file_innodb.sql