snippetsqlMinor
How can I find the user who performed a database transaction?
Viewed 0 times
canthehowperformeduserwhodatabasetransactionfind
Problem
I am using MySQL database. Suppose a database "X". It is used by multiple users. I want to find those users who performed any transaction of data into this database. Is it possible?
Can I find it from MySQL binary log? How?
Can I find it from MySQL binary log? How?
Solution
Yes you can find what you are looking for in mysql log files.
Binary Log keeps track of the transactions that describe database changes such as table creation operations or changes to table data.
Query Log keeps track of all operations including Select and Show statements.
Both log files describe the action with the user who performed it.
This link is a tutorial for how to read binary log file.
Binary Log keeps track of the transactions that describe database changes such as table creation operations or changes to table data.
Query Log keeps track of all operations including Select and Show statements.
Both log files describe the action with the user who performed it.
This link is a tutorial for how to read binary log file.
Context
StackExchange Database Administrators Q#11765, answer score: 3
Revisions (0)
No revisions yet.