博客
关于我
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/

你可能感兴趣的文章
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded
查看>>
org.tinygroup.serviceprocessor-服务处理器
查看>>
org/eclipse/jetty/server/Connector : Unsupported major.minor version 52.0
查看>>
org/hibernate/validator/internal/engine
查看>>
Orleans框架------基于Actor模型生成分布式Id
查看>>
SQL-36 创建一个actor_name表,将actor表中的所有first_name以及last_name导入改表。
查看>>
ORM sqlachemy学习
查看>>
Ormlite数据库
查看>>
orm总结
查看>>
os.environ 没有设置环境变量
查看>>
os.path.join、dirname、splitext、split、makedirs、getcwd、listdir、sep等的用法
查看>>
os.removexattr 的 Python 文档——‘*‘(星号)参数是什么意思?
查看>>
os.system 在 Python 中不起作用
查看>>
OS2ATC2017:阿里研究员林昊畅谈操作系统创新与挑战
查看>>
OSCACHE介绍
查看>>
SQL--合计函数(Aggregate functions):avg,count,first,last,max,min,sum
查看>>
OSChina 周五乱弹 ——吹牛扯淡的耽误你们学习进步了
查看>>
SQL--mysql索引
查看>>
OSChina 周四乱弹 ——程序员为啥要买苹果手机啊?
查看>>