Solved

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

Posted on 2011-09-21
1
225 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
1 Comment
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

11 Experts available now in Live!

Get 1:1 Help Now