mysqlbinlog 加-v -vv 的区别

先看命令帮组解释:

 -v, --verbose       Reconstruct pseudo-SQL statements out of row events. 

--显示sql 语句

-vv   Reconstruct pseudo-SQL statements out of row events.  adds comments on column data types.

--显示sql 语句加 字段类型


下面来看实验:

1、刷日志 ,往表中出入一条数据

2、不加任何参数,看不出什么信息

#180705 11:01:01 server id 92  end_log_pos 383 CRC32 0xa17cd722         Write_rows: table id 111 flags: STMT_END_F

BINLOG '
7Yk9WxNcAAAALwAAAFcBAAAAAG8AAAAAAAEABHRlc3QABHRlc3QAAQMAAbHvqRQ=
7Yk9Wx5cAAAAKAAAAH8BAAAAAG8AAAAAAAEAAgAB//4BAAAAItd8oQ==
'/*!*/;
# at 383
#180705 11:01:03 server id 92  end_log_pos 414 CRC32 0x528d63a1         Xid = 131
COMMIT/*!*/;/

3、加 -v :mysqlbinlog -v mysql-bin.000040

### INSERT INTO `test`.`test`
### SET
###   @1=1
# at 383
#180705 11:01:03 server id 92  end_log_pos 414 CRC32 0x528d63a1         Xid = 131
COMMIT/*!*/;

4、加-vv :mysqlbinlog -vv mysql-bin.000040

### INSERT INTO `test`.`test`
### SET
###   @1=1 /* INT meta=0 nullable=1 is_null=0 */
# at 383
#180705 11:01:03 server id 92  end_log_pos 414 CRC32 0x528d63a1         Xid = 131
COMMIT/*!*/;
另外 --base64-output=name  参数能够控制日志部分是否显示

你可能感兴趣的:(mysql)