Skip to main content
Connect RisingWave to MariaDB 11.4 to ingest data changes in real time using the native MariaDB CDC source connector. The connector uses Debezium’s dedicated MariaDB connector and supports snapshots, incremental changes, transactions, automatic schema changes, recovery, and binlog monitoring.

Prerequisites

Configure the MariaDB server to use row-based binary logging. In the MariaDB server configuration file, set the following options and restart the server:
binlog_legacy_event_pos must be enabled so that the connector can resume reliably from a saved binlog position. Create a MariaDB user and grant it the privileges needed for a shared CDC source:
MariaDB 10.5 and later reports BINLOG MONITOR as the renamed equivalent of REPLICATION CLIENT. RisingWave accepts either privilege when validating the source.

Connect to MariaDB

First, create a shared source that establishes the connection to MariaDB:
Then create a table for each upstream table that you want to replicate. The upstream table name must include the database name.
You can use one shared source to create tables from multiple databases by setting database.name to a comma-separated list of database names.

Source parameters

For Debezium MariaDB connector properties, add the debezium. prefix to the property name and specify it in the WITH clause.

Table parameters

Tables created from a MariaDB CDC source support the same snapshot and backfill parameters as MySQL CDC tables. See MySQL CDC table parameters. MariaDB columns use the same RisingWave type mappings as MySQL columns. See MySQL CDC data type mapping.

Automatically replicate schema changes

Set auto.schema.change = 'true' on the source to automatically apply supported upstream schema changes to tables created with *: