Striim Migration Service for Google Cloud Documentation

Enable change data capture in MySQL or MariaDB

During streaming integration, SMSGC reads from the MySQL binary log. If MySQL is using replication, the binary log is enabled, otherwise it may be disabled.

For on-premise MySQL or MySQL running in a Google Compute Engine VM

For on-premise MySQL, the property name for enabling the binary log, whether it is one or off by default, and how and where you change that setting vary depending on the operating system and your MySQL configuration, so for instructions see the binary log documentation for the version of MySQL you are running.

If the binary log is not enabled, Striim's attempts to read it will fail with errors such as the following:

2016-04-25 19:05:40,377 @ -WARN hz._hzInstance_1_striim351_0423.cached.thread-2 
com.webaction.runtime.Server.startSources (Server.java:2477) Failure in Starting 
Sources.
java.lang.Exception: Problem with the configuration of MySQL
Row logging must be specified.
Binary logging is not enabled.
The server ID must be specified.
Add --binlog-format=ROW to the mysqld command line or add binlog-format=ROW to your 
my.cnf file
Add --bin-log to the mysqld command line or add bin-log to your my.cnf file
Add --server-id=n where n is a positive number to the mysqld command line or add 
server-id=n to your my.cnf file
        at com.webaction.proc.MySQLReader_1_0.checkMySQLConfig(MySQLReader_1_0.java:605) ...
For on-premise MariaDB

See Activating the Binary Log.

For Amazon RDS for Aurora

See How do I enable binary logging for my Amazon Aurora MySQL cluster?.

For Amazon RDS for MariaDB
  1. Create a new parameter group for the database (see Creating a DB Parameter Group).

  2. Edit the parameter group, change binlog_format to row, and save the parameter group (see Modifying Parameters in a DB Parameter Group).

  3. Reboot the database instance (see Rebooting a DB Instance).

For Amazon RDS for MySQL

See Setting up CDC for MySQL on RDS.

For Azure Database for MySQL

You must create a read replica to enable binary logging. See Read replicas in Azure Database for MySQL.