1

To maintain my GTID-Replication, I want to see the content of the GTID transaction. I use this command to do that:

#I want to see the content of binlog when GTID=1
mysqlbinlog -u USER -p'PASS' mysql-bin.000001  --database=DB  --include-gtids='SERVER_ID:1' --verbose

Besides the content, the output contains many strange lines starting with # at number. When I add | wc -l, those lines exceed thousands.

What I want is:

  1. What are those lines? Is there a way to remove them?
  2. The output contains many lines starting with #, /* (comments). Is there a way to remove them?

I know it is possible to redirect the output and then use commands like grep to remove them; I want to know if there is a utility with mysqlbinlog to do that for me.

N_Z
  • 248
  • 2
  • 13

0 Answers0