MySQL 日志之 binlog 格式 → 关于 MySQL 默认隔离级别的探讨

日志文件:文件名.00000*

MySQL 日志之 binlog 格式 → 关于 MySQL 默认隔离级别的探讨

记录了对 MySQL 数据库执行了更改的所有操作

因为 binlog 的日志文件是二进制文件,不能用文本编辑器直接打开,需要用特定的工具来打开,MySQL 提供了 mysqlbinlog 来帮助我们查看日志文件内容

mysqlbinlog 可选参数很多, mysqlbinlog.exe --help

mysqlbinlog.exe Ver 3.3 for Win64 at x86

Copyright © 2001, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Dumps a MySQL binary log in a format usable for viewing or for piping to

the mysql command line client.

Usage: mysqlbinlog.exe [options] log-files

-?, --help Display this help and exit.

–base64-output[=name]

Determine when the output statements should be

base64-encoded BINLOG statements: ‘never’ disables it and

works only for binlogs without row-based events;

‘decode-rows’ decodes row events into commented SQL

statements if the --verbose option is also given; ‘auto’

prints base64 only when necessary (i.e., for row-based

events and format description events); ‘always’ prints

base64 whenever possible. ‘always’ is deprecated, will be

removed in a future version, and should not be used in a

production system. --base64-output with no ‘name’

argument is equivalent to --base64-output=always and is

also deprecated. If no --base64-output[=name] option is

given at all, the default is ‘auto’.

–character-sets-dir=name

Directory for character set files.

-d, --database=name List entries for just this database (local log only).

–debug-check Check memory and open file usage at exit .

–debug-info Print some debug info at exit.

-D, --disable-log-bin

Disable binary log. This is useful, if you enabled

–to-last-log and are sending the output to the same

MySQL server. This way you could avoid an endless loop.

You would also like to use it when restoring after a

crash to avoid duplication of the statements you already

have. NOTE: you will need a SUPER privilege to use this

option.

-F, --force-if-open Force if binlog was not closed properly.

(Defaults to on; use --skip-force-if-open to disable.)

-f, --force-read Force reading unknown binlog events.

-H, --hexdump Augment output with hexadecimal and ASCII event dump.

<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值