Convert All MyISAM Tables To InnoDB

Today I took on the task of converting our SugarCRM MySQL MyISAM tables to InnoDB. Currently we have roughly 200 tables in the SugarCRM DB. Its a time consuming processes to convert each table one at a time. Luckily, using some SQL scripting you can make this much less painful.

Start by running the following query to build a list of SQL statements that will handle converting each table.

The output generates a query for each table to be converted to InnoDB.

Copy and paste these results and run the queries. After some time (in my case about 20 minutes) all of the tables in the DB will be converted to InnoDB.