查看死锁的日志是否开启
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
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