Msyql show processlist

Source: Internet
Author: User

If the login user has the super permission, you can see the status of all connections to MySQL.

mysql> show processlist ;+----------+---------+----------------------+------+-------------+-------+----------------------------------------------------------------+------------------+| Id       | User    | Host                 | db   | Command     | Time  | State                                                          | Info             |+----------+---------+----------------------+------+-------------+-------+----------------------------------------------------------------+------------------+| 41419293 | jw_sync | 172.24.224.28:45800  | NULL | Sleep       | 65190 |                                                                | NULL             | | 41419294 | jw_sync | 172.24.224.28:45801  | NULL | Binlog Dump | 65197 | Has sent all binlog to slave; waiting for binlog to be updated | NULL             | | 41486860 | jw_sync | 172.23.100.210:36396 | NULL | Query       |     0 | NULL                                                           | show processlist | +----------+---------+----------------------+------+-------------+-------+----------------------------------------------------------------+------------------+

The ID indicates a serial number. The user column indicates the connected user name, the host indicates the connected Host IP address and port, and the DB indicates the current dB. Command

Sleep: waiting for the client to send the command

BINLOG dump: BINLOG dump thread

Query: query command

mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema | | dc_params_06       | | dc_params_07       | | mysql              | | test               | +--------------------+

After changing dabatase, the DB column is changed.

mysql> use test;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> show processlist ;+----------+---------+----------------------+------+-------------+-------+----------------------------------------------------------------+------------------+| Id       | User    | Host                 | db   | Command     | Time  | State                                                          | Info             |+----------+---------+----------------------+------+-------------+-------+----------------------------------------------------------------+------------------+| 41419293 | jw_sync | 172.24.224.28:45800  | NULL | Sleep       | 65560 |                                                                | NULL             | | 41419294 | jw_sync | 172.24.224.28:45801  | NULL | Binlog Dump | 65567 | Has sent all binlog to slave; waiting for binlog to be updated | NULL             | | 41486860 | jw_sync | 172.23.100.210:36396 | test | Query       |     0 | NULL                                                           | show processlist | +----------+---------+----------------------+------+-------------+-------+----------------------------------------------------------------+------------------+

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.