Covert all tables from MyISAM to InnoDB

Here’s a quick one liner to convert all tables on in a specified database from MyISAM to InnoDB:

mysql -Bse "SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' engine=InnoDB;') FROM information_schema.tables WHERE engine = 'MyISAM' and table_schema = 'your_database_name';" | xargs -I {} mysql -e {}

Boom! You’re welcome.