找出18号0点到19号9点,筛选出数据库jiuku_ywinename_sph表前后6条操作记录 

grep -B 1 B是前面(Before 1)

grep -A 1 A是后面(After 1)


mysqlbinlog --start-datetime='2014-08-18 00:00:00' --stop-datetime='2014-08-19 09:00:00' mysql-bin.0043* |grep 'jiuku_ywinename_sph' -B 6 A6 >>/home/zhangtx/mysqlbinlog/log819.sql


--database=ring               指定需要解析哪个数据库,只提取某个数据库的sql语句