mysql> show processlist;                                                             
    show processlist;                                                                    
    +-----+------+-----------+---------+---------+-------+-------+------------------+    
    | Id  | User | Host      | db      | Command | Time  | State | Info             |    
    +-----+------+-----------+---------+---------+-------+-------+------------------+    
    | 657 | prog | localhost | weather | Sleep   | 28619 |       | NULL             |    
    | 782 | prog | localhost | weather | connected|   853 |       | NULL             |    
    | 785 | prog | localhost | NULL    | Query   |     0 | NULL  | show processlist |    
    +-----+------+-----------+---------+---------+-------+-------+------------------+    
    3 rows in set (0.00 sec)                                    请问下:
Command 栏中sleep, connect ,query到底表示什么意思,我要求准备的概念阐述,最好能有到mysql官方的解释链接?

解决方案 »

  1.   

    通常 是sleep,如果一直是connect说明什么?
      

  2.   

    Connect Out Slave connecting to master.
      

  3.   

    看一下这个吧:
    http://mysqld.active-venture.com/SHOW_PROCESSLIST.html
      

  4.   

    我用的是mysql4.1.7; 在这边找到了
    http://dev.mysql.com/doc/refman/4.1/en/show-processlist.html
    Command The value of that column corresponds to the COM_xxx commands of the client/server protocol. See Section 5.2.4, “Status Variables” The Command value may be one of the following: Binlog Dump, Change user, Close stmt, Connect, Connect Out, Create DB, Daemon, Debug, Delayed insert, Drop DB, Error, Execute, Fetch, Field List, Init DB, Kill, Long Data, Ping, Prepare, Processlist, Query, Quit, Refresh, Register Slave, Reset stmt, Set option, Shutdown, Sleep, Statistics, Table Dump, Time 
    不过,没给出各个command的说明,特别是Connect, 有点遗憾