I use a slow.log logging on my MySQL server, to catch bottlenecks in my script, but at the same time, i use phpmyadmin on this server. My script and phpmyadmin has different MySQL user accounts and now, when i analyzing the slow.log file, i see a lot of spam from phpmyadmin queries, is it possible, to configure the MySQL to logging a slow queries only from specific users?


I don't know of any options to set up separate slow query logs per user, but many of the log query parsers can be configured to just print for a user, or exclude a user.

https://code.google.com/p/mysql-log-filter/ for example offers the following ways.


-ih, --include-host
-eh, --exclude-host
-iu, --include-user
-eu, --exclude-user
-iq, --include-query

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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