Check used & available maximum connection in MySQL
Check maximum available connection in MySQL
mysql> SHOW GLOBAL VARIABLES LIKE 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 500 |
+-----------------+-------+
1 row in set (0.02 sec)
Check used connection in MySQL
mysql> SHOW GLOBAL STATUS LIKE 'max_used_connections';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Max_used_connections | 1 |
+----------------------+-------+
1 row in set (0.20 sec)
Check connected session list or Process list in MySQL
select id,
user,
host,
db,
command,
time,
state,
info
from information_schema.processlist;