I use a slow.log
logging on my MySQL server to catch bottlenecks in my scripts, but at the same time I use phpmyadmin
on this server. My scripts 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?
If using MySQL 5.6, you can use the performance schema, and look at the different statements summaries there.
There are summaries by account (someuser@somehost), by username alone (someuser) or by host alone (somehost).
See the following tables:
http://dev.mysql.com/doc/refman/5.6/en/performance-schema.html