mysql加速导入数据的简单设置
# 修改前查询参数值 show variables like 'foreign_key_checks'; show variables like 'unique_checks'; show variables like 'innodb_flush_log_at_trx_commit'; show variables like 'sync_binlog'; # 执行如下加速操作 SET GLOBAL foreign_key_checks=0; SET GLOBAL unique_checks=0; SET GLOBAL innodb_flush_log_at_trx_commit=0; SET GLOBAL sync_binlog=0; # 执行具体的导入sql操作 -- ... # 将参数修改回原值 SET GLOBAL foreign_key_checks=1; SET GLOBAL unique_checks=1; SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL sync_binlog=1;