title: MySQL - show query by query id in mysql < 5.1.7
body: <p>I have a long running transaction running on a database </p>
  
  <pre><code>---TRANSACTION 2 4166167596, ACTIVE 14868 sec, process no 7906, OS thread id 1169635648
  MySQL thread id 34318076, query id 1997556522 10.186.131.136 admin
  </code></pre>
  
  <p>The above is an output from <code>SHOW INNODB ENGINE STATUS</code> command</p>
  
  <p>I want to see what query is running by with the query id 1997556522. <code>SHOW FULL PROCESSLIST</code> is not an option, since it requires me to manually find the query from a list of hundreds. </p>
  
  <p>This <a href="https://stackoverflow.com/questions/929612/how-to-customize-show-processlist-in-mysql">SO Thread</a> says you can do that by querying the <code>INFORMATION_SCHEMA.PROCESSLIST</code> table on MySQL 5.1.7 and greater. Is it possible to do so on an older version?</p>
  
  <p>I am running on MySQL 5.0.45</p>