Bug #16524 Database accounting/monitoring per user
Submitted: 15 Jan 2006 22:28 Modified: 21 Jun 2007 13:46
Reporter: Dennis Krul Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S4 (Feature request)
Version:5 OS:Linux (GNU/Linux)
Assigned to: CPU Architecture:Any
Triage: Triaged: D5 (Feature request)

[15 Jan 2006 22:28] Dennis Krul
Description:
MySQL is in use by a lot of shared hosting providers. 

Unfortunately it is impossible to do any kind of accounting per user and/or database, which makes it difficult to do identify heavy users when there are performance issues.

How to repeat:
(Not applicable)

Suggested fix:
The 'mysqladmin status' command currently provides the following information:

Threads
Questions
Slow queries
Opens
Flush tables
Open tables
Queries per second avg

It would be nice to be able to get a report with these stats for each user and/or database. 

It would also be nice to see the amount of traffic per user@host. (For network traffic accounting it is essential to seperate the local from the external traffic.)
[1 Oct 2006 8:27] Valeriy Kravchuk
Thank you for a reasonable feature request.
[21 Jun 2007 13:46] Dennis Krul
Still not much progress on this one. But fortunately Google made some patches:

http://code.google.com/p/google-mysql-tools/wiki/UserTableMonitoring

It would be nice to see these patches included in a future version of MySQL :)
[28 Apr 2008 10:43] Alan Williamson
I too would like to see this per-host, per-user accountancy.
[13 May 2008 23:14] David Spindler
This would be very helpful
[1 Nov 2009 21:13] Jozef Janitor
Is there anything new in this area? I am building a high performance mysql server setup and accounting of user/db/table activities is very important for me.
This information could be used e.g. when facing performance issues. Or ... is there any other way to find out who is the primary cause that the DB is getting slow?

Thank you.
Jozef
[2 Dec 2009 18:50] Ariel Antebi
I agree that a feature like this is very important.  If not only for bandwidth and usage accountability then for user level auditing in such a way as to attain PCI compliance.

That would take MySQL to the next level in the enterprise market.