數據庫表之前的引擎是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";
之后復制到文檔里,把橫杠去掉就可以執行了!