find all MyISAM tables

SELECT TABLE_SCHEMA as DbName ,TABLE_NAME as TableName ,ENGINE as Engine FROM information_schema.TABLES WHERE ENGINE='MyISAM' AND TABLE_SCHEMA NOT IN('mysql','information_schema','performance_schema');

And maybe you want to convert them to InnoDB, this script generates you the queries:

SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=InnoDB;')
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'yourDBName' AND ENGINE = 'MyISAM' AND TABLE_TYPE = 'BASE TABLE'

Leave a Reply

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