Show Processlist and Show Full Processlist – MySQL Tip
Everyone knows that using the MySQL command Show Processlist will display all current connections, like the following :
mysql> show processlist;
| Id | User | Host | db | Command | Time | State | Info |
| 1 | root | localhost:32893 | NULL | Sleep | 0 | | NULL |
| 5 | system user | | NULL | Connect | 98 | Waiting for master to send event | NULL |
| 6 | system user | | NULL | Connect | 5018 | Reading event from the relay log | NULL |
3 rows in set (0.00 sec)
What is little known however is that the Show Full Processlist command will display the full query in the Info column. By default, Show Processlist will only display the first 100 characters. One thing to keep in mind about the Info line is that while the statement (query) might be the one sent to the server, it will display the innermost statement if the statement executes other statements.
- How to increase MySQL performance when loading a Dump File
- How do I store an IP Address in MySQL? INET_AtoN!