Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
understanding output of mysql version 2 67
MSSQL 2008 with mySQL webservers 7 60
updating the date data 12 34
reverse engineer .sql from php files 11 35
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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