Solved

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

Posted on 2011-09-21
1
231 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

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

632 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