mysql_processlist
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mysql_processlist [2015/10/15 08:15] – created luke7858 | mysql_processlist [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Investigating mysql ==== | ==== Investigating mysql ==== | ||
| - | https:// | ||
| \\ | \\ | ||
| + | == Query List == | ||
| + | To view mysql query list run the following command from the command line: | ||
| + | <sxh bash> | ||
| + | SELECT * FROM information_schema.processlist WHERE command != ' | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | <sxh bash> | ||
| + | mysqladmin pr | grep Query | sort -nk12 | ||
| + | </ | ||
| + | Example output: | ||
| + | <sxh bash> | ||
| + | | 5950 | user1 | localhost | example_com | Query | 0 | checking query cache for query | SELECT m.filename, m.datedir, m.description, | ||
| + | | 5977 | root | localhost | | Query | 0 | | show processlist | ||
| + | | 5032 | user2 | localhost | new_shop | Query | 49 | Sending data | SELECT m.*, mm.is_winner, | ||
| + | </ | ||
| + | \\ | ||
| + | == All Processes == | ||
| If you need to investigate mysql you can troubleshoot by investigating the processlist | If you need to investigate mysql you can troubleshoot by investigating the processlist | ||
| <sxh> | <sxh> | ||
| Line 23: | Line 41: | ||
| SELECT * FROM information_schema.processlist WHERE command != ' | SELECT * FROM information_schema.processlist WHERE command != ' | ||
| </ | </ | ||
| + | \\ | ||
| + | ^ Header ^ Description ^ | ||
| + | | ID | Connection identifier | | ||
| + | | User | MySQL user who issued the statement | | ||
| + | | Host | Host name of the client issuing the statement | | ||
| + | | db | Default database, if one is selected, otherwise NULL | | ||
| + | | Command| The type of command the thread is executing | | ||
| + | | Time | Time in seconds that the thread has been in its current state | | ||
| + | | State | An action, event, or state that indicates what the thread is doing | | ||
| + | | Info | The statement the thread is executing | | ||
| + | |||
| + | |||
| === mysql Common Commands === | === mysql Common Commands === | ||
| ^ Command | ^ Command | ||
| - | | Connect | + | | Connect |
| - | | Connect Out | | + | | Connect Out | Replication slave is in the process of connecting to its master |
| - | | Drop DB | | + | | Drop DB | Executing an operation to drop a database |
| - | | Error | | + | | Error | Error | |
| - | | Execute | + | | Execute |
| - | | Fetch | | + | | Fetch | Fetching the results of an executed prepared statement |
| - | | Kill | | + | | Kill |
| - | | Query | | + | | Query | Executing a statement |
| - | | Quit | | + | | Quit |
| - | | Sleep | | + | | Sleep | Waiting for the client to send a new statement |
| - | | Table Dump | | + | | Table Dump | Sending the contents of a table to a slave | |
| + | |||
| + | source: https:// | ||
mysql_processlist.1444896903.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
