Skip to content

Instantly share code, notes, and snippets.

@mttjohnson
Last active February 25, 2020 10:05
Show Gist options
  • Select an option

  • Save mttjohnson/8a1ed889e0fca08d35b4aa478de0e96d to your computer and use it in GitHub Desktop.

Select an option

Save mttjohnson/8a1ed889e0fca08d35b4aa478de0e96d to your computer and use it in GitHub Desktop.
MySQL Deadlocks
-- enabled the logging for deadlocks on the mysql server via a global config set:
SET GLOBAL innodb_print_all_deadlocks = 1;
-- You can query the server to check the current status of the config value:
select @@innodb_print_all_deadlocks;
-- The log file it writes to is typically /var/log/mysqld.log
-- view most recent deadlock
SHOW ENGINE INNODB STATUS;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment