Solved

viewing a binlog to see when a record was last touched in mysql

Posted on 2011-09-21
1
229 Views
Last Modified: 2012-05-12
A record was updated today, I need to see when/who modified it the last before today's date - what would be the best way to acheive this.

b) If it is to look at the log files in this month, do I need to go file through file to look into or is there a quicker way.
0
Comment
Question by:Jsara
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
ID: 36579229
Assuming your on a *nix machine you can make a shell script like:

for file in `ls -1 /path/to/mysql-bin.*`; do
  echo ${file}
  /usr/local/mysql/bin/mysqlbinlog ${file} | grep 'put the string you are looking for here i.e. primary_key_column=value'
done

This will let help you identify which binlog file contains the statement you are looking for.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

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://…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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