Upon logging in to the mysql database's interactive shell, we can use the "show processlist;" command. This will list the running querries currently to the database of the logged in user.
One one of the interactive shell, we somehow run for example.
mysql> select sleep(100);
mysql> show processlist;
+----+------+-----------+------+---------+------+-----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+------+---------+------+-----------+------------------+
| 23 | root | localhost | NULL | Query | 2 | executing | select sleep(100)|
| 24 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+----+------+-----------+------+---------+------+-----------+------------------+
2 rows in set (0.00 sec)
We can somehow kill hte process if we elect to, using the "kill 23" (23 being the process id).
No comments:
Post a Comment