Skip to content

Instantly share code, notes, and snippets.

@russianryebread
Created December 24, 2018 21:27
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 russianryebread/5420a51647db7b2eb58a1e514f354df0 to your computer and use it in GitHub Desktop.
Save russianryebread/5420a51647db7b2eb58a1e514f354df0 to your computer and use it in GitHub Desktop.
Get connection counts by user in MySQL
SELECT USER, count(*) AS connection_count
FROM information_schema.processlist
GROUP BY USER
ORDER BY connection_count DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment