PSowmiya
on Dec 26, 2018 06:31 AM
2623 Views
hi sir
I want to count the number of systems connected to the server in mysql.
i want only clients connected to the server for particular database belongs to root user.
How to get it
Download FREE API for Word, Excel and PDF in ASP.Net:
Download
thank you sir.
In second link, following query solves my problem
SELECT IFNULL(usr,'All Users') user,IFNULL(hst,'All Hosts') host , COUNT(1) Connections FROM ( SELECT user usr,LEFT(host,LOCATE(':',host) - 1) hst FROM information_schema.processlist WHERE user='root' ) A GROUP BY usr,hst WITH ROLLUP