2010-08-12 108 views
7

我曾經使用過一個工具來打開和分析二進制文件。輸出過去是二進制日誌文件分析

insert into table1 
update table4 
insert into some_other_table 

它用來顯示在二進制文件中有多少插入或更新語句。瞭解服務器是否插入/刪除記錄或是否有重大更新發生很有用。

我不記得該實用程序的名稱。任何提示?

回答

7

終於找到了我正在尋找的工具。

http://forge.mysql.com/tools/tool.php?id=273

由於鏈接不工作,這裏是代碼...

mysqlbinlog filename | grep -i -e "^update" -e "^insert" -e "^delete" -e "^replace" -e "^alter" | cut -c1-100 | tr '[A-Z]' '[a-z]' | sed -e "s/\t/ /g;s/\`//g;s/(.*$//;s/ set .*$//;s/ as .*$//" | sed -e "s/ where .*$//" | sort | uniq -c | sort -nr | head -50 
+1

這是一個死鏈接... – 2012-11-02 09:27:14