SET SESSION binlog_format = 'mixed'; set autocommit=0; 在sql语句中分批提交 innodb_flush_log_at_trx_commit = 2;