Convert MyISAM Tables to InnoDB

Hey guys,

We recently upgraded OJS by migrating from version 2.4.8 to 3.2.1-4 and our tables are configured in MyISAM, is it possible to convert them to Innodb?
What is the best way to perform this operation?

Carlos,

I’m running OJS 3.3.0.7 with InnoDB exclusively (MariaDB 10.3). In fact, while testing the migration from 3.1 to 3.3 I saw the new tables were created using InnoDB engine and that’s why I decided to recreate a full InnoDB database.

I think this is a quite safe approach:
1- make a dump of your database
2- open the SQL dump file with a text editor and replace ENGINE=MyISAM with ENGINE=InnoDB globally (using vim, for instance, you can run :%s/ENGINE=MyISAM/ENGINE=InnoDB/gc to double check each occurrence)
3- restore the updated dump

Your should try it in a development environment first, obviously.

Hope this helps. Regards!

1 Like