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

你可能感兴趣的文章
OAuth2授权码模式详细流程(一)——站在OAuth2设计者的角度来理解code
查看>>
OAuth2:项目演示-模拟微信授权登录京东
查看>>
OA系统多少钱?OA办公系统中的价格选型
查看>>
OA系统选型:选择好的工作流引擎
查看>>
OA让企业业务流程管理科学有“据”
查看>>
OA项目之我的会议(会议排座&送审)
查看>>
OA项目之我的会议(查询)
查看>>
Object c将一个double值转换为时间格式
查看>>
object detection之Win10配置
查看>>
object detection训练自己数据
查看>>
object detection错误Message type "object_detection.protos.SsdFeatureExtractor" has no field named "bat
查看>>
object detection错误之Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
查看>>
object detection错误之no module named nets
查看>>
Object of type 'ndarray' is not JSON serializable
查看>>
Object Oriented Programming in JavaScript
查看>>
object references an unsaved transient instance - save the transient instance before flushing
查看>>
Object.keys()的详解和用法
查看>>
OBJECTIVE C (XCODE) 绘图功能简介(转载)
查看>>
Objective-C ---JSON 解析 和 KVC
查看>>
Objective-C 编码规范
查看>>