動作しているスレッドに関する情報を確認

mysql> show processlist;
+----+----------+--------------------------+--------------------+---------+------+-------+------------------+
| Id | User     | Host                     | db                 | Command | Time | State | Info             |
+----+----------+--------------------------+--------------------+---------+------+-------+------------------+
|  1 | root     | localhost                | information_schema | Query   |    0 | NULL  | show processlist |
|  2 | variable | anywhere.mshome.net:1776 | DB01               | Sleep   |   13 |       | NULL             |
|  3 | variable | anywhere.mshome.net:1777 | DB01               | Sleep   |    3 |       | NULL             |
|  4 | variable | anywhere.mshome.net:1778 | DB01               | Sleep   |    8 |       | NULL             |
+----+----------+--------------------------+--------------------+---------+------+-------+------------------+
4 rows in set (0.00 sec)
mysql>

mysql> show full processlist;
+----+----------+--------------------------+--------------------+---------+------+-------+-----------------------+
| Id | User     | Host                     | db                 | Command | Time | State | Info                  |
+----+----------+--------------------------+--------------------+---------+------+-------+-----------------------+
|  1 | root     | localhost                | information_schema | Query   |    0 | NULL  | show full processlist |
|  2 | variable | anywhere.mshome.net:1776 | DB01               | Sleep   |   89 |       | NULL                  |
|  3 | variable | anywhere.mshome.net:1777 | DB01               | Sleep   |    4 |       | NULL                  |
|  4 | variable | anywhere.mshome.net:1778 | DB01               | Sleep   |   84 |       | NULL                  |
+----+----------+--------------------------+--------------------+---------+------+-------+-----------------------+
4 rows in set (0.00 sec)
mysql>


mysql> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+----+----------+--------------------------+--------------------+---------+------+-----------+----------------------------------------------+
| ID | USER     | HOST                     | DB                 | COMMAND | TIME | STATE     | INFO                                         |
+----+----------+--------------------------+--------------------+---------+------+-----------+----------------------------------------------+
|  4 | variable | anywhere.mshome.net:1778 | DB01               | Sleep   |   79 |           | NULL                                         |
|  3 | variable | anywhere.mshome.net:1777 | DB01               | Sleep   |    4 |           | NULL                                         |
|  2 | variable | anywhere.mshome.net:1776 | DB01               | Sleep   |  219 |           | NULL                                         |
|  1 | root     | localhost                | information_schema | Query   |    0 | executing | SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST |
+----+----------+--------------------------+--------------------+---------+------+-----------+----------------------------------------------+
4 rows in set (0.00 sec)
mysql>

information_schema_processlist

「PROCESS」権限が無いと、SHOW PROCESSLISTコマンドを実行しても
自分のPROCESSのみしか確認出来ません。
process

Comments are closed.

Post Navigation