How to convert MythTV MySQL tables from MyISAM into InnoDB

I wanted to upgrade my MythTV MySQL tables from MyISAM into InnoDB format. When I installed Mythbuntu 12.04, MyISAM was the default database engine. Now the default database engine moving forward in InnoDB. Here are the steps I took to upgrade using phpMyAdmin. I am not sure if I documented all the steps here, so use at your own risk.

SET @DATABASE_NAME = 'mythconverg';
SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM information_schema.tables AS tb WHERE table_schema = @DATABASE_NAME AND `ENGINE` = 'MyISAM' AND `TABLE_TYPE` = 'BASE TABLE' ORDER BY table_name DESC;

  • Copy the output from this query and paste these results back in the “Run SQL query/queries on database mythconverg” SQL query input box.

Leave a Reply

Your email address will not be published. Required fields are marked *