title: Find the number of active connections per database in MySQL
body: <p>I have a drupal application that uses the database named db1. Each time a drupal request is sent, a new connection to database will be established.So after a certain number of conneections has reached the site turns offline showing the following error: </p>
  
  <p>User db1 already has more than 'max_user_connections' active connections. </p>
  
  <p>So my aim is to close the database connection and thereafter avoiding the offline error. For this I need to find the number of active connections made to my database.I have tried with the SHOW PROCESSLIST command. But it is not showing the number of connections. </p>
  
  <p>Is there any method to find the number of database connections made to a mysql database? </p>
  
  <p>Thanks,</p>