Solved

we are using mysql 5.1.39. how to know which user has run a particular statement.

Posted on 2011-03-14
3
260 Views
Last Modified: 2012-05-11
we are using mysql 5.1.39.


a) how to know which user or through which machine a particular statement was executed.
Is it through bin logs or log file.

b) If we don't know exactly the time when the update/insert statement was run to look into the binlog, but know the primary id and the date we need to check for any modifications done. How to look into this.

0
Comment
Question by:Jsara
  • 2
3 Comments
 
LVL 50

Expert Comment

by:Steve Bink
ID: 35135348
0
 

Author Comment

by:Jsara
ID: 35142358
thanks, it answers my question to some extent, how to corelate this with who exceuted a particular statement or made a change to the record or deleted or infact inserted a new record.
0
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 35144044
The article's images show this to you.  Specifically, see the second image for how information from the log can be used to identify the user running the query, time and date of the request, and the full text of the command.

http://3.bp.blogspot.com/_bOa3aOPXCQo/SYyTLCScVHI/AAAAAAAAAFY/_oH661nPqTc/s1600-h/mysql_2.png
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now