------------------
#/bin/sh
binlogfile=$1
if [ ! -n $binlogfile ]
then
echo "pls input your mysqlbinlogfile name."
else
/usr/local/mysql/bin/mysqlbinlog --no-defaults --base64-output=decode-row -v -v ${binlogfile}
| awk '/###/{if($0~/UPDATE|INSERT|DELETE/) count[$2" " $NF]++} END{for(i in count) print i," ",count[i]}'
| column -t | sort -k3nr
fi