alert table mytable engine = InnoDB;mysql
使用工具将表保存到文件,打开文件修改表的存储引擎以及表名sql
执行语句工具
create table new_table like old_table; alter table new_table engine=InnoDB; insert into new_table select * from old_table
若是数据量比较大,能够根据主键分批操做,若是有必要能够对原表加锁,保证新表与原表数据一致性能
start transaction; insert into new_table select * from old_table where id between x and y; commit;
以上内容参考自《高性能mysql》code