查看MySQL二进制文件中的内容有两种方式1. mysqlbinlog2. SHOW BINLOG EVENTS [IN log_name] [FROM pos] [LIMIT [offset,] row_count] 下面来测试一下,在mysql中执行如下操 ...
查看MySQL二进制文件中的内容有两种方式
1. mysqlbinlog
2. SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
下面来测试一下,在mysql中执行如下操作
mysql> flush logs;Query OK, 0 rows affected (0.01 sec)mysql> insert into test.t1 values(1,'a');Query OK, 1 row affected (0.00 sec)mysql> use testReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> insert into test.t1 values(2,'b');Query OK, 1 row affected (0.00 sec)mysql> show master status;+------------------+----------+--------------+------------------+-------------------+| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |+------------------+----------+--------------+------------------+-------------------+| mysql-bin.000021 | 546 | | | |+------------------+----------+--------------+------------------+-------------------+1 row in set (0.00 sec)
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:浅析MySQL二进制日志
关键词:MYSQL
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。