show variables like "%innodb_print_all_deadlocks%";开启记录死锁
show variables like "%innodb_print_all_deadlocks%";
set global innodb_print_all_deadlocks=1重启mysql后会失效查看死锁show engine innodb status;=====================================查看慢查询日志:mysqldumpslow -s -t 10 slow.log
set global innodb_print_all_deadlocks=1