MySQL 8.0 C API Developer Guide

10.2 C API Binary Log Data Structures

C API functions for processing a replication event stream from a server require a connection handler (a MYSQL * pointer) and a pointer to a MYSQL_RPL structure that describes the steam of replication events to read from the server binary log. For example:

MYSQL *mysql = mysql_real_connect(...);

MYSQL_RPL rpl;

# ... initialize MYSQL_RPL members ...

int result = mysql_binlog_open(mysql, &rpl);

This section describes the MYSQL_RPL structure members. Connection handlers are described in Section 5.2, “C API Basic Data Structures”.

The applicable MYSQL_RPL members depend on the binary log operation to be performed:

MYSQL_RPL structure member descriptions: