Solved

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

Posted on 2011-03-14
3
261 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

13 Experts available now in Live!

Get 1:1 Help Now