• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

show processlist だとすべてのDBのコネクションが表示されるので、 show processlist コマンドで出力される情報のもとになっている、 information_schema.processlist テーブルにクエリを発行して確認する。

   1  mysql> desc information_schema.processlist;
   2  +---------------+---------------------+------+-----+---------+-------+
   3  | Field         | Type                | Null | Key | Default | Extra |
   4  +---------------+---------------------+------+-----+---------+-------+
   5  | ID            | bigint(4)           | NO   |     | 0       |       |
   6  | USER          | varchar(16)         | NO   |     |         |       |
   7  | HOST          | varchar(64)         | NO   |     |         |       |
   8  | DB            | varchar(64)         | YES  |     | NULL    |       |
   9  | COMMAND       | varchar(16)         | NO   |     |         |       |
  10  | TIME          | int(7)              | NO   |     | 0       |       |
  11  | STATE         | varchar(64)         | YES  |     | NULL    |       |
  12  | INFO          | longtext            | YES  |     | NULL    |       |
  13  | TIME_MS       | bigint(21)          | NO   |     | 0       |       |
  14  | ROWS_SENT     | bigint(21) unsigned | NO   |     | 0       |       |
  15  | ROWS_EXAMINED | bigint(21) unsigned | NO   |     | 0       |       |
  16  | ROWS_READ     | bigint(21) unsigned | NO   |     | 0       |       |
  17  +---------------+---------------------+------+-----+---------+-------+
  18  12 rows in set (0.00 sec)
  19  
  20  mysql>select * from information_schema.processlist where db = <db_name>;

posted by Png akanuma on Fri 20 Sep 2013 at 11:35
Contents
[MySQL] 特定のDBのコネクション数を確認する
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ