What the binary log file records: Changes to the record table.
The form of binary log file records: statement-based replication, row-based replication.
Advantages and disadvantages of two types of records:
Statement-based replication--it does not guarantee the correctness of replication. If the random function may be executed on both machines the result is not the same.
Row-based replication--it guarantees the correctness of replication. But the problem is that it may need more network traffic. Because it's going to copy the entire row of data.
See how the binary logs are logged:
Show Binlog events in ' Log_name '; default is the first binary log file if you do not specify a log_name.
Show Binlog events in ' logbin.000011 '
Log_name: Log file name
POS: The byte position at which the event begins
Event_type: Type of Event
SERVER_ID: The ID of the server (server_id specified in my.cnf)
End_log_pos: Byte position at end of event +1
Info: Readable text for an event
MySQL Show Binglog event in ' Log_name '