Skip to contentManaged Kafka is live: Apache Kafka on AWS for half the cost of MSK

Sources

MariaDB source setup

Configure MariaDB as a source in Artie with binlog replication, service account setup, and GTID support through Artie's MySQL connector.

Artie connects to MariaDB with its MySQL connector. It detects MariaDB from the server version and switches to MariaDB’s binlog and GTID handling automatically, so there is nothing MariaDB-specific to configure in the Artie dashboard.

What you’ll need

  • Database connection details
  • A service account
  • binlog_format set to ROW
  • At least 24 hours of binlog retention

Setup

  1. Create a service account

    Run the following SQL to create a dedicated user for Artie:

    setup.sql
    CREATE USER 'artie' IDENTIFIED BY 'password';
    -- SELECT is required for backfills.
    -- REPLICATION CLIENT and REPLICATION SLAVE are required for Artie to read the binary log.
    GRANT SELECT, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'artie';
  2. Enable binlog (ROW format)

    Binary logging must be enabled with binlog_format set to ROW.

    1. Create a parameter group

      Navigate to RDS > Parameter groups > Create parameter group. Select the MariaDB family that matches your version.

    2. Set binlog_format to ROW

      Open the new parameter group, search for binlog_format, and set it to ROW.

    3. Apply the parameter group

      Associate the parameter group with your RDS instance, then reboot the database for the change to take effect.

  3. Set binlog retention period

    Artie requires at least 24 hours of binlog retention.

    SQL
    CALL mysql.rds_set_configuration('binlog retention hours', 24);
  4. Create the source in Artie

    When you create a pipeline, choose MariaDB as the source and enter your connection details. Artie creates a MySQL connector for it, so the source is listed as MySQL afterwards.

Additional features

  • GTID support: with gtid_strict_mode enabled, Artie resumes replication from GTIDs instead of binlog file positions.
Enabling GTID

MariaDB writes GTIDs to the binary log by default. Artie uses them once gtid_strict_mode is on, because strict mode guarantees that sequence numbers only increase within each replication domain.

SQL
SET GLOBAL gtid_strict_mode = ON;

Add gtid_strict_mode = ON to your configuration file as well (on RDS, set it in the parameter group). You can verify the settings with:

SQL
SHOW VARIABLES LIKE 'gtid_strict_mode';
SELECT @@gtid_binlog_pos;

gtid_strict_mode should be ON and gtid_binlog_pos should not be empty.

Frequently asked questions

Which MariaDB versions are supported?

Artie supports MariaDB 10.6, 10.11, and 11 or higher. Amazon RDS for MariaDB uses the same setup, with the parameter group and retention steps shown above.

Can I replicate from a read replica?

Yes, if the replica writes replicated changes to its own binary log. Artie reads the replica’s local binary log, not its relay log.

Configure the replica with:

  • log_bin enabled
  • binlog_format = ROW
  • log_slave_updates = ON
  • A healthy replication connection
  • At least 24 hours of local binlog retention

Use these queries on the replica to verify its configuration:

SQL
SHOW VARIABLES WHERE variable_name IN ('log_bin', 'binlog_format', 'log_slave_updates');
SHOW SLAVE STATUS;
SHOW BINARY LOGS;

How do I verify that binlog is enabled?

Run the following queries on your MariaDB server:

SQL
SHOW VARIABLES LIKE 'log_bin';
SHOW VARIABLES LIKE 'binlog_format';
SHOW MASTER STATUS;

log_bin should be ON, binlog_format should be ROW, and SHOW MASTER STATUS should return the current binlog file and position.

What happens if binlog retention is too short?

If binlog files are purged before Artie can read them, the pipeline will need to re-snapshot the affected tables. We recommend at least 24 hours of retention to provide a comfortable buffer.