Mysql – How to tell if a MySQL database is being accessed

MySQL

Is there some convenient way to see which users are accessing a MySQL database? Ideally I'd have some kind of application making this easy, but other methods would be OK.

If there isn't a standard definition, I would accept "have queried the database in the last 30 minutes".

Best Answer

How about the query:

SHOW FULL PROCESSLIST

This will show you connections to the database, what user they are logged in with, the state of the connection, and any currently running command.

Related Topic