How to set max user connection per database in mysql? Hi i am new to MySQL and currently using version 5.5, currently i have one instance for MySQL, with 50 databases hosted on that instance. We have identified that per database there were fix amount of users connection per database is getting used like in my case its 100 users are active on that database. we would like to know is there any specific setting under which this behavior is getting observed?
You may set a cron every minute to trigger below command and pipe it to a logfile and rotate it every day.

select current_timestamp();

select count(*) sumOfUsers , user,db from information_schema.processlist group by user,db;


After a day you may grep for values more than 90 in sumOfUsers column to see which line and then you may get timestamp above it. Thus you may measure time range and do manual monitoring around that time to see how often it takes the connections almost 100. Also you may add Host  in query to see if any particular application host is doing this pile up of connections.