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:
- What are those lines? Is there a way to remove them?
- 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.