Show Processlist fetches the information from another table. Here is how you can pull the data and look at 'INFO' column which contains the whole query :
select * from INFORMATION_SCHEMA.PROCESSLIST where db = 'somedb';
You can add any condition or ignore based on your requirement.
The output of the query is resulted as :
+-------+------+-----------------+--------+---------+------+-----------+----------------------------------------------------------+| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |+-------+------+-----------------+--------+---------+------+-----------+----------------------------------------------------------+| 5 | ssss | localhost:41060 | somedb | Sleep | 3 | | NULL || 58169 | root | localhost | somedb | Query | 0 | executing | select * from sometable where tblColumnName = 'someName' |
shareimprove this answeredited Oct 13 '16 at 9:57manatwork1,39411924answered Jan 20 '16 at 20:59Yogesh Sakurikar515410