MySQL can log all queries in what is called "General Log"
Is there a way to keep this query log but skip all queries for a specific user? Or maybe for a specific database?
I would like so because I have a database that one user connects to (application user), so I want to have the query log to make debug easier in staging area, but I also have a daemon that connects to this same database with another user, and daemon issues like 1 query per second. So my query logs are 80% filled by this daemon's query so I would like to skip them to make it easier to find app user's queries.
general_log
server setting's scope is GLOBAL only. You cannot disable it for a separate connection (account) and/or for a separate database.pt-query-digest
can help in looking at the file.cat
ortail
or plain text editor, hence my willing to have mysql not put these query into the file (rather than filter when displaying the file, tho I could docat file.log | grep -v 'table_name_or_schema_name'
)