View the current number of connections to the mysql database

Command: mysql> show processlist;

or 

# mysqladmin -uroot -p密码 processlist

 

If it is the root account, you can see the current connections of all users. If it is another ordinary account, you can only see the connections occupied by yourself.

show processlist; only list the first 100, if you want to list all, please use show full processlist;
mysql> show processlist;

command: show status;
or # mysqladmin -uroot -p password status
Aborted_clients The client has died because the connection is not properly closed , the number of connections that have been abandoned.
Aborted_connects Number of attempts to connect to MySQL servers that have failed.
Connections The number of attempts to connect to the MySQL server.
Created_tmp_tables The number of implicit temporary tables that have been created when the statement was executed.
Delayed_insert_threads The number of delayed insertion processor threads in use.
Delayed_writes Number of rows written with INSERT DELAYED.
Delayed_errors The number of rows written with INSERT DELAYED where certain errors (possibly duplicate key values) occurred.
Flush_commands The number of times to execute the FLUSH command.
Handler_delete The number of times a row was requested to be deleted from a table.
Handler_read_first The number of times the first row in the table was requested to be read.
Handler_read_key Request number to read rows based on key.
Handler_read_next The number of times a row was requested based on a key.
Handler_read_rnd The number of times a row was requested to be read based on a fixed position.
Handler_update The number of times a row in the table was requested to be updated.
The number of times Handler_write requests to insert a row into the table.
Key_blocks_used The number of blocks used for the key cache.
Key_read_requests The number of times a key was read from the cache.
Key_reads The number of times a key value was physically read from disk.
Key_write_requests The number of times a block of keywords was requested to be written to the cache.
Key_writes The number of times a key-value block was physically written to disk.
Max_used_connections The maximum number of simultaneous connections.
Not_flushed_key_blocks Key blocks that have changed in the key cache but have not been flushed to disk.
Not_flushed_delayed_rows The number of rows waiting to be written in the INSERT DELAY queue.
Open_tables The number of open tables.
Open_files The number of open files.
Open_streams The number of open streams (mainly used for logging)
Opened_tables The number of tables that have been opened.
Questions The number of queries sent to the server.
Slow_queries The number of queries that took longer than long_query_time.
Threads_connected The number of currently open connections.
Threads_running Number of threads not sleeping.
How many seconds the Uptime server worked.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324594656&siteId=291194637