Skip to main content
The MariaDB Target Connector writes the records of your Popsink subscriptions into MariaDB tables, applying every insert, update and delete as it arrives. MariaDB has its own target, separate from the MySQL Target, just as it has its own source: the two servers have drifted apart (driver, TIMESTAMP range, native UUID type), so each one is written on its own terms. A MySQL server is refused by this connector.

Compatible versions

MariaDB 10.6 and older are refused by the credential check. A MySQL server is refused too: use the MySQL Target.

Prerequisites

  • Network access from Popsink to the MariaDB server (port 3306 by default).
  • A database that will receive the tables. In MariaDB a schema is a database: Popsink writes into the database you configure.
  • A user with the following privileges on that database:
CREATE TEMPORARY TABLES is needed for the staging table each flush loads into before it is applied to the target table.
  • Recommended: local_infile = ON on the server. Popsink then loads each batch with LOAD DATA LOCAL INFILE, its fastest path. With local_infile = OFF the connector still works, through batched statements, at a lower throughput.
The credential check refuses the connection, with the setting to change, when the server is a MySQL server, when it is older than 10.11, or when a privilege above is missing.

Configuration

With encryption on and the server certificate not trusted, the certificate and the host name are both verified.

How rows are written

  • Records are applied in batches. Each batch is loaded into a temporary staging table, then applied to the target table in one transaction: existing keys are updated, new keys inserted, deleted keys removed.
  • The connector never uses INSERT … ON DUPLICATE KEY UPDATE: that statement fires on any unique index and could overwrite an unrelated row. Rows are matched on the subscription’s key only.
  • A row whose value has not changed is not rewritten.
  • Records without a key are identified by a hash of their content, as on the other SQL targets.
  • Sessions run in READ COMMITTED with the time zone set to UTC.

Data types

Popsink creates each table on its first record. Columns are typed from the Avro schema of the source record, read from the Schema Registry, never from the values. When a subscription applies its column mapping, an explicit cast in the mapping takes precedence. An existing table keeps the types it already has.
MariaDB has no column type that keeps a time zone: a ZonedTimestamp is converted to UTC and its offset is dropped. Timestamps go into DATETIME(6) rather than TIMESTAMP, whose range stops in 2038 before MariaDB 11.5. MariaDB stores microseconds, so nanosecond values are truncated. JSON is written as text (MariaDB’s JSON type is an alias for LONGTEXT). Nested records and maps are not supported as columns: flatten them in the column mapping.
On a table that already exists, a BOOLEAN value goes into an INT or TINYINT column as 1 / 0, and a float into a DOUBLE column.

Schema evolution

  • New source columns are added with ALTER TABLE … ADD.
  • Type changes are applied with ALTER TABLE … MODIFY when the new type is wider. Decimals are widened, never narrowed. If MariaDB refuses the change, the subscription stops on that table instead of skipping data.
  • Dropped source columns are kept in the table, and stay NULL for new rows.
  • With schema evolution off on the subscription, any change that needs an ALTER stops the subscription.

FAQ

No. The MySQL target refuses a MariaDB server, and this one refuses a MySQL server. Create a MariaDB target instead.
No, but it is recommended. Without it, rows are written through batched statements, which is slower on large volumes.
Into the database set on the target. There is no separate schema field: in MariaDB, schema and database are the same thing.

Target data types

Compare column types across every target.

MariaDB Source

Capture changes from MariaDB through its binary log.

Start a pipeline

End-to-end example to validate your configuration.