Last active
May 31, 2017 04:10
-
-
Save tkhk/ae3590e9a976eed11c226405892599b7 to your computer and use it in GitHub Desktop.
the number of connections to MySQL (group by HOST)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(*), SUBSTRING(HOST, 1, POSITION(':' in HOST)-1) AS ip FROM INFORMATION_SCHEMA.PROCESSLIST GROUP BY ip; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment