Solved

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

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
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://…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 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