tags:

views:

161

answers:

2

Hi Experts, How can i find which query is being executed in mysql. Example : I have a java application which makes several calls to the database, i want to track the queries executed by this application from the sql side.

Thanks Micheal

+2  A: 

show processlist will tell you what each thread is doing on MySQL server.

Alex
+3  A: 

Use:

show processlist;

...to show you the running queries on your MySQL server. For more info: Showing running queries in MySQL

show full processlist

...will show the complete query of all connected clients.

OMG Ponies
this will show the process list , i want to see the actual query at the give point.
`show full processlist` will show the complete query of all connected clients.
longneck