For MySQL sources, Data Replication uses the mysqlbinlog utility to read change events that are in binary format from binary log files. You specify the binary log base name and directory for a MySQL source connection on the
Extract Range
tab in the Data Replication Console.
MySQL binary log files contain events that describe changes, including table data changes and DDL changes such as CREATE TABLE. The term
binary log file
refers to an individual log file that contains database events and that has a unique name ending with a generated numeric suffix. The numeric suffix is incremented with each new log file. The term
binary log
refers to a series of binary log files plus the index file that contains the names of all used binary log files.
A binary log file name contains a base name and numeric suffix and has the following format:
base_name
_binlog.
numeric_suffix
. For example, mysql_5_7_binlog.000001.
When MySQL creates a new physical binary log file, it increments the numeric suffix in the log file name. MySQL creates a new log file under the following conditions:
The MySQL server is restarted.
The binary log file reaches the maximum size defined in the MySQL max_binlog_size variable.
If a MySQL server is restarted with a new log base name, a new series of binary logs starts. The first log file in the new series has a numeric suffix of 000001. Online binary log file name queries will not return information about the previous binary logs. However, the previous binary logs and index file remain available on the server disk.
This scenario might cause data loss. To ensure data integrity, verify the current log base name when starting or restarting data capture.