当前位置:网站首页>The mysqlbinlog command uses

The mysqlbinlog command uses

2022-07-06 08:30:00 wx5caecf2ed0645


Common parameters :

--start-datetime=datetime From the binary log 1 Date time is equal to or later than datetime The event of the parameter starts reading .datetime The value is relative to the run time mysqlbinlog Local time zone on your machine . The value format should conform to DATETIME or TIMESTAMP data type .

--stop-datetime=datetime From the binary log 1 Date time is equal to or later than datetime The event of parameter starts and stops reading . About datetime For a description of the value, see --start-datetime Options . This option can help you recover in a timely manner .

--start-position=N From the binary log 1 A position is equal to N Parameter when the event starts reading .

--stop-position=N From the binary log 1 Positions equal to and greater than N Parameter when the event starts and stops reading .

--base64-output=DECODE-ROWS The row Patterns bring sql change

-d And --database The effect is the same , Specify a database name .

--offset=N,-o N Skip the former N Entries .


Be careful :

1. Do not view the currently being written binlog file

2. Do not add --force Parameters force access

3. If binlog The format is row mode , Please add -vv Parameters


Based on start / End time

mysqlbinlog --start-datetime='2018-07-10 00:00:00' --stop-datetime='2018-07-10 01:01:01' -d Library name Binary


be based on pos value

mysqlbinlog --start-position=107 --stop-position=1000 -d Library name Binary


Convert to readable text

mysqlbinlog --base64-output=DECODE-ROWS  -vv -d Library name Binary


原网站

版权声明
本文为[wx5caecf2ed0645]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131817488386.html