MySQL - show query by query id in mysql < 5.1.7

rubayeet

I have a long running transaction running on a database

---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

The above is an output from SHOW INNODB ENGINE STATUS command

I want to see what query is running by with the query id 1997556522. SHOW FULL PROCESSLIST is not an option, since it requires me to manually find the query from a list of hundreds.

This SO Thread says you can do that by querying the INFORMATION_SCHEMA.PROCESSLIST table on MySQL 5.1.7 and greater. Is it possible to do so on an older version?

I am running on MySQL 5.0.45

Ike Walker

You should use the thread id, not the query id.

If you have shell access you can execute show full processlist and then grep for the relevant thread id.

For example:

mysql -e "show full processlist;" | grep 34318076

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ZF 1 Mysql WHERE IN query

From Dev

MySql show tables query

From Dev

Mysql query: decrease value by 1

From Dev

3 MYSQL query using 1 query and limit

From Dev

Find and show partial text in mysql query

From Dev

Is there a MySQL query that will only show the string searched for?

From Dev

PHP mysql update multiple row by single query SET='101' where id =1,2,3,7,9

From Dev

MySQL query to show running total per week

From Dev

Mysql database does not show query result in php

From Dev

mysql run query but dont show results

From Dev

mysql query group and show possible values

From Dev

MySQL query doesn't show results properly

From Dev

Show query result ONLY in MySQL

From Dev

MySQL Query : How to show all number and sum it

From Dev

MySQL - show query by query id in mysql < 5.1.7

From Dev

how to get a specific id within 5 rows in a paging query in Mysql

From Dev

Show all combinations using MySql query

From Dev

php - show the mysql Select query results

From Dev

Is this possible to do in 1 mysql query

From Dev

mysql run query but dont show results

From Dev

MySQL Query always returns -1

From Dev

MySQL query with total percentage by id

From Dev

Show results from mysql query with php 5

From Dev

Show single record from mysql query database

From Dev

how combine 2 query into 1 query with mysql

From Dev

Show message "nothing found" query mysql pdo

From Dev

Multiple mysql UPDATE with 1 query

From Dev

MySQL Query to show shared columns

From Dev

MYsql query to show products with 0 quantity to the bottom