faqts : Computers : Databases : MySQL : Common Problems : Server Status

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

25 of 37 people (68%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can I see the entire SQL queries that are currently executing?
How can I see a list of the current MySQL processes?
How can I see all currently executing queries?

Oct 29th, 2003 08:53
Brandon Tallent, Nathan Wallace, Sinisa Milivojevic, Sasha Pachev


This works since MySLQ 3.23.7:
    mysqladmin -uuser -ppasswd -v processlist
It gives entire SQL command.
You can also run the following from a query window:
SHOW FULL PROCESSLIST
Unfortunatly, you must rerun it each time you want to view the currently executing query.  
With 3.22 you are out of luck and will have to just guess, or log query
times in your client code, which is actually a good idea.