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

你可能感兴趣的文章
OA项目之会议通知(查询&是否参会&反馈详情)
查看>>
Vue.js 学习总结(13)—— Vue3 version 计数介绍
查看>>
OA项目之我的会议(会议排座&送审)
查看>>
OA项目之我的会议(查询)
查看>>
OA项目之我的审批(会议查询&会议签字)
查看>>
OA项目之项目简介&会议发布
查看>>
ObjC的复制操作
查看>>
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 类的常见方法有哪些?
查看>>
Object-c动态特性
查看>>
Object.assign用法
查看>>
Object.create
查看>>