I need a query that will give me the active or open number of connections to a certain database for a certain user. I have been searching for hours and have come up with nothing so far. I am close, so here is what I have tried.
SHOW STATUS WHERE `variable_name` = 'Threads_connected';
SHOW STATUS LIKE '%onn%';
SELECT * FROM information_schema.processlist WHERE USER='database_user';
I work for a web hosting company, and one of our clients keeps hitting his max_user_connections
limit, so in troubleshooting why I need to know how many connections his user is using right now since he is no a shared server. I am currently using MySQL (InnoDB) version 5.5.36. Any help would be greatly appreciated!