Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have enabled the query and slow_query logging in MySQL, but I'm getting new entries every second of the type:

            2 Query show global status
110925 21:18:18     1 Query select 1

I've noted these entries comes from MySQL Workbench (probably the Server Status Monitor)

Do you know if it's possible to filter the activity from MySQL Workbench?
Or maybe log queries from one Database?

share|improve this question
add comment

1 Answer

The general log its general, so you cant avoid logging all the databases.

But, you can use something like pt-query-digest (one tool from the percona toolkit http://www.percona.com/software/percona-toolkit) to filter the logs afterwards using the filter option.

As example to filter logs from one database

--filter '($event->{db} || "") =~ m/database_name/'

btw, usually slow query is a good thing to enable but general query log its just for debugging and i will try to avoid it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.