MySQL provides SHOW PROCESSLIST query, which shows currently running threads on the database server. This statement is very useful during troubleshooting the “too many connections” error message on the database server. This will help you to find out what is going on.
Login to the MySQL console with SUPER user privilege and execute the following query
mysql> SHOW PROCESSLIST;
You can also use SHOW FULL PROCESSLIST command, which displays the currently running threads on MySQL in detailed format. Login to MySQL console and run following query.
mysql> SHOW FULL PROCESSLIST;