批量将mysql库中是myisam引擎的表转成innodb

select concat(’alter table ‘, TABLE_SCHEMA, ‘.’, TABLE_NAME, ‘ engine=innodb;’) from information_schema.TABLES where ENGINE=’Myisam’ and TABLE_SCHEMA<>’mysql’ and TABLE_SCHEMA<>’information_schema’ into outfile ‘/tmp/wade_alter.sql’ ;


然后执行wade_alter.sql就行了

你可能感兴趣的:(mysql,Engine,where)