数据库表之前的引擎是MyISAM,影响事务操作,要改成Innodb引擎
查询表引擎
SELECT CONCAT(table_name,' ', engine) FROM information_schema.tables WHERE table_schema="表名" AND ENGINE="MyISAM";
生成修改sql
select CONCAT('alter table ',table_name,' engine=InnoDB;') FROM information_schema.tables WHERE table_schema="数据库名" AND ENGINE="MyISAM";
之后复制到文档里,把横杠去掉就可以执行了!