TO read binary logs content by mysqlbinlog to text file:
Working steps: @mysql 8.0.20
**Copy binary log file to some other server and then generate scripts.
--Place above binary log file to Path:C:\Program Files\MySQL\MySQL Server 8.0\bin> and try below
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME-bin.007127 --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latestone.sql
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000056 > C:\Temp\statements.sql
DBSERVERNAME-bin.007127
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME-bin.007127 --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latestone.sql
--base64-output=DECODE-ROWS --verbose
C:\Program Files\MySQL\MySQL Server 8.0\bin>
##########################################################################
--Place above binary log file to Path:
C:\Program Files\MySQL\MySQL Server 8.0\bin> and try below
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latest11.sql
--To filter binary logs based on issue start time and stop time.
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --start-datetime "2022-08-30 08:13:00" --stop-datetime "2022-08-30 13:15:00" --base64-output=DECODE-ROWS --verbose > C:\Temp\statements_latest12.sql
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS -vv > C:\Temp\statements_latest13.sql
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --base64-output=DECODE-ROWS -vv > C:\Temp\statements_latest13.sql
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqlbinlog DBSERVERNAME1-bin.000057 --start-datetime "2022-08-30 08:13:00" --stop-datetime "2022-08-30 13:15:00" --base64-output=DECODE-ROWS -vv > C:\Temp\statements_latest14.sql
C:\Program Files\MySQL\MySQL Server 8.0\bin>
########################################################################
No comments:
Post a Comment