Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejohn/66d2221a8caf15223b7c7fd722cad53b to your computer and use it in GitHub Desktop.
Save thejohn/66d2221a8caf15223b7c7fd722cad53b to your computer and use it in GitHub Desktop.
MySQL - kill command for all idle queries
SELECT GROUP_CONCAT('kill ',id SEPARATOR '; ') AS kill_list
FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE command='Sleep';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment