Find current sessions in MySQL
Show all processes in mysql cluster.
mysql configurationintermediate
by MYSQL
13 views
Show all processes in mysql cluster.
1234567891011121314151617181920
mysql>
show processlist;
+----+-----------------+-----------+------+---------+-------+------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+-----------+------+---------+-------+------------------------+------------------+
| 5 | event_scheduler | localhost | NULL | Daemon | 34888 | Waiting on empty queue | NULL |
| 23 | root | localhost | test | Sleep. | 36 | | NULL |
| 24 | root. | localhost | NULL | Query | 0 | init | show processlist |
+----+-----------------+-----------+------+---------+-------+------------------------+------------------+
3 rows in set (0.00 sec)
mysql>
select * from information_schema.processlist where user='root'\G
mysql>
select * from information_schema.processlist where DB='test';
+----+------+-----------+------+---------+------+-------+------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+----+------+-----------+------+---------+------+-------+------+
| 23 | root | localhost | test | Sleep | 70 | | NULL |
+----+------+-----------+------+---------+------+-------+------+
1 row in set (0.00 sec)Please to add comments
No comments yet. Be the first to comment!