tags:

views:

40

answers:

3

I'm using Sqlyog to run queries on a db.

Is there a way to view the all the current running queries on the db (and possibly kill some of them)? If not, what is a recommended tool for this purpose?

A: 

Hi, try installing the free Mysql Administrator. It has a tab where it lists all the queries running on the server. Probably you can do the same with the command line tools but i think that the administrator is more user friendly.

wezzy
+2  A: 

SHOW PROCESSLIST and then KILL [process number].

Randy
A: 

You can also get this information by executing the MySQL command SHOW PROCESSLIST or by querying the INFORMATION_SCHEMA.PROCESSLIST table.

Both of these approaches can be used by humans or code to get process list info. You can even do things like:

SELECT Time FROM INFORMATION_SCHEMA.PROCESSLIST WHERE User = '...' (etc.)
Ben Gribaudo