Answers:
下面是查询以查找具有MyISAM
引擎的所有表
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');
查询上方将列出所有具有MyISAM
引擎的表。
有关如何将现有MyISAM表转换为InnoDB
的查询,将返回ALTER语句以将现有表转换为InnoDB 。MyISAM
InnoDB
SELECT CONCAT('ALTER TABLE `', TABLE_SCHEMA,'`.`',TABLE_NAME, '` ENGINE = InnoDB;') FROM information_schema.TABLES WHERE ENGINE='MyISAM' AND TABLE_SCHEMA NOT IN('mysql','information_schema','performance_schema');
您可以执行这些语句来转换引擎。