Solved

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

Posted on 2011-03-14
3
262 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
simple mysql statement 3 38
How many transactions can mysql handle? 3 31
MySQL Error Code 2 20
How do uses indexes to maximize MySQL Searches 14 27
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…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

772 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