Find the query from query_id in mysql

TJ- picture TJ- · Aug 25, 2011 · Viewed 10.5k times · Source

Can I find the exact query from mysql query id?

This is a part of "SHOW ENGINE INNODB STATUS" in MySQL:

MySQL thread id 1106, query id 1360 localhost 127.0.0.1 test2
---TRANSACTION 0 19491, not started, OS thread id 2960035840

Is there a way by which I can find what was the query with id 1360?

Answer

bpgergo picture bpgergo · Aug 25, 2011

Some folks say turn on 'general log' and you'll find your query by id. http://forums.mysql.com/read.php?22,419784,419896#msg-419896