Who is connected to your MyQL Server

How to find who is connected to your MY SQL Server?



it is very essy to find out who is connected to your MySQL server
just query processlist table of your Information_Schema


mysql> select * from PROCESSLIST;
+----+------+-----------------+--------------------+---------+------+-----------+---------------------------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+----+------+-----------------+--------------------+---------+------+-----------+---------------------------+
| 6 | root | localhost:60766 | information_schema | Query | 0 | executing | select * from PROCESSLIST |
+----+------+-----------------+--------------------+---------+------+-----------+---------------------------+
1 row in set (0.00 sec)

or

your favorite Show command



mysql> show processlist;
+----+------+-----------------+--------------------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------------+--------------------+---------+------+----------+------------------+
| 6 | root | localhost:60766 | information_schema | Query | 0 | starting | show processlist |
+----+------+-----------------+--------------------+---------+------+----------+------------------+
1 row in set (0.00 sec)


please like the post and leave your comment if you find the post usable.

No comments:

Post a Comment