博客
关于我
MySQL工具【mysqlbinlog 日志管理】
阅读量:363 次
发布时间:2019-02-28

本文共 2261 字,大约阅读时间需要 7 分钟。

MySQL????????mysqlbinlog

??MySQL??????????????????????????MySQL????????????????????????????????????????????????mysqlbinlog????????????mysqlbinlog??????????????????????

mysqlbinlog????????MySQL?????????????????????????????????`ib_logfile`????? mysqlbinlog ?????????????????????????????????

mysqlbinlog?????

mysqlbinlog ????????????????????????????????????????????????

  • -d, --database=name????????????????????????????
  • -o, --offset=n????????n?????????????????
  • -r, --result-file=name?????????????????????????
  • -s, --short-form??????????????????
  • --set-charset=char-name??????????????????????????????????
  • --start-datetime=name?????????????????????
  • --stop-datetime=name?????????????????????
  • --start-position=N1?--stop-position=N2????????????????????????

??????

???????????????????????? mysqlbinlog ???

????????

[root@ufo128 mysql]# mysqlbinlog ib_logfile0

?????????MySQL???????????????????????????????????????File is not a binary log file???????

?????????

[root@ufo128 mysql]# mysqlbinlog -d test ib_logfile0

????????????`test`?????????????????????????????????????

???????????

[root@ufo128 mysql]# mysqlbinlog -vv ib_logfile0 -d test | grep AAA | more

?????????????`-vv`???????????`-d test`????????`grep AAA`?????AAA??????????`| more`???????????????????????????????????

???????

[root@ufo128 mysql]# mysqlbinlog -o 3 ib_logfile0

?????????????????????????????`-o`??????????????????????3??????????????????

????????

[root@ufo128 mysql]# mysqlbinlog -vv ib_logfile0 -o 3 -r output.log

?? mysqlbinlog ????????????????`-r`???????????????????????????????????????

??????

[root@ufo128 mysql]# mysqlbinlog -s ib_logfile0 -d test

??`-s`????????????????????????????????????????????

??????????

?????????????????????mysqlbinlog ???`--start-datetime`?`--stop-datetime`?????????????????

[root@ufo128 mysql]# mysqlbinlog --start-datetime='2021/02/17 00:00:00' --stop-datetime='2021/02/18 00:00:00' ib_logfile0 -d test

??????2021?2?17?00:00:00?2021?2?18?00:00:00???????????????????????????????

??????????

????????????????????????`--start-position`?`--stop-position`???

[root@ufo128 mysql]# mysqlbinlog --start-position=4 --stop-position=196 ib_logfile0 -d test

????????????4???196??????????????????????

?????????????????? mysqlbinlog ????????MySQL??????????????????????????????????????????

转载地址:http://fahi.baihongyu.com/

你可能感兴趣的文章
oracle获取数据库表、字段、注释、约束等
查看>>
Oracle计划将ZGC项目提交给OpenJDK
查看>>
Oracle闪回技术(Flashback)
查看>>
oracle零碎要点---ip地址问题,服务问题,系统默认密码问题
查看>>
oracle零碎要点---oracle em的web访问地址忘了
查看>>
Oracle零碎要点---多表联合查询,收集数据库基本资料
查看>>
Oracle静默安装
查看>>
Oracle面试题:Oracle中truncate和delete的区别
查看>>
ThreadLocal线程内部存储类
查看>>
thinkphp 常用SQL执行语句总结
查看>>
Oracle:ORA-00911: 无效字符
查看>>
Text-to-Image with Diffusion models的巅峰之作:深入解读 DALL·E 2
查看>>
TCP基本入门-简单认识一下什么是TCP
查看>>
tableviewcell 中使用autolayout自适应高度
查看>>
Orcale表被锁
查看>>
svn访问报错500
查看>>
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
查看>>
org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
查看>>
org.apache.poi.hssf.util.Region
查看>>
org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
查看>>