Skip to content

MariaDB Holds the Truth. Most Integrations Only Read It.

A technical buyer's guide to choosing an integration platform for MariaDB. It covers how change is detected (binary log change capture with GTID versus polling a timestamp column), what row-level write-back into a production primary actually requires, how connection limits, replica lag, Galera clusters, and schema drift break naive integrations, and the MariaDB versus MySQL differences that show up at exactly this layer. Ends with the checklist to test a platform against before it touches your database.

Author
Ruben Burdin · Founder & CEO
Published
July 22, 2026
Read time
8 min read
MariaDB Holds the Truth. Most Integrations Only Read It.
DATA ENGINEERING

Ask a room of engineers where the real state of the business lives and you get an argument. Ask their database and you get an answer. Orders, subscriptions, entitlements, inventory positions, the row that decides whether an account can log in: in a large number of enterprises that data sits in MariaDB, and every other system is downstream of it.

The trouble starts with the word integration. In most stacks it means a nightly job that copies MariaDB tables into a warehouse so analysts can query them. That is extraction. It is useful, and it is one direction, one consumer, nothing flowing back. When a rep updates an account in Salesforce or support changes an entitlement in a ticket, the database everything else trusts stays wrong until somebody writes a script.

Four things a MariaDB integration has to get right: binary log change capture, row-level write-back, replica and connection limits, and one engine that syncs both ways

This guide covers what an integration platform actually has to handle when MariaDB is the system of record: how it detects change, how it writes back without knocking the database over, what happens when the schema moves under it, and how it behaves against read replicas and a Galera cluster. It also covers the MariaDB and MySQL differences that show up at exactly this layer.

Why MariaDB ends up holding the operational truth

MariaDB began in 2009 as a fork of MySQL, taken by Michael Widenius after Oracle's acquisition of Sun put the original project's future in doubt. He named it after his younger daughter, Maria, the same way MySQL was named after his elder daughter, My. That story is worth reading in full, and we told it in the origin story of MariaDB. The reason it matters here is practical: a fork that stayed open source under a foundation is a fork plenty of enterprises adopted deliberately, and it has been drifting from upstream MySQL ever since.

That drift is invisible until you connect something to it. Both databases speak the same wire protocol and both write a binary log, so a MySQL client connects without complaint. The details an integration depends on are no longer identical.

MariaDBMySQL 8
GTID formatDomain, server, sequence (0-1-1234)Source UUID plus transaction number
JSON columnAlias for LONGTEXT with a check constraintNative binary JSON type
System-versioned tablesBuilt in, queried with FOR SYSTEM_TIMENot available
Common cluster shapeGalera multi-primary, multi-source replicationGroup replication, InnoDB Cluster
DriversMariaDB Connector/J, /C, /ODBCMySQL Connector/J, /C, /ODBC

Same protocol, different internals. An integration that assumes MySQL will eventually trip on one of these rows.

None of that stops a connection from opening. It does mean a change capture implementation written against MySQL's GTID format has to understand MariaDB's, and a field mapping that expects a native JSON column has to handle a LONGTEXT that happens to contain JSON. If you run both engines in the same estate, the MariaDB connector and the MySQL connector are treated as separate systems for this reason.

Change capture: read the binary log, do not poll the table

There are two ways to find out that a row in MariaDB changed. You can ask, repeatedly, or you can be told.

Asking means polling: a query every 30 or 60 seconds against an updated_at column, ordered and limited, per table. It works on small tables and gets expensive quickly. It needs an indexed timestamp on every table you care about, it misses hard deletes entirely, it misses any update that does not touch the timestamp, and it competes with your application for the same buffer pool and the same connections. At a few hundred tables it becomes background load a DBA will notice.

Being told means change data capture from the binary log. MariaDB already writes every committed row change there for replication and point-in-time recovery. A sync engine registers as a replica, reads the stream from a GTID position, and receives inserts, updates, and deletes in commit order with no query load on the tables. Set binlog_format=ROW so events carry before and after images rather than statement text, and keep binlog_row_image=FULL if you want conflict resolution to compare the old value.

Polling a timestamp columnBinary log change capture
LatencyOne poll interval, 30 to 60 secondsSub-second, as the transaction commits
Load on the databaseA query per table, per intervalOne replication stream, no table reads
Hard deletesMissed unless the app soft deletesCaptured as delete events
OrderingBest effort, per tableCommit order, across tables
Setup costAn indexed timestamp on every tablebinlog_format=ROW and a replication user

The difference is not only speed. Polling cannot see a hard delete at all, and no amount of tuning fixes that.

Topology: the MariaDB cluster with its binary log and replicas, the sync engine that captures change and writes back, and Salesforce, HubSpot, and Snowflake on the far side
One engine attached to the cluster, with the business systems never talking to MariaDB directly.

That shape is the one to hold a vendor to. One stream in, writes back out through the same engine, and every application system on the far side going through the integration layer rather than opening its own connection to your primary.

Writing back into MariaDB is the half most tools skip

Reading is the easy direction. Every ELT vendor can extract from MariaDB. Ask what happens when the value changes on the other side and the answers thin out fast.

A write-back path has to solve problems an extract never meets. It has to write a single row rather than reload a table, because reloading a 40 million row orders table to change one status is not something you do to a production primary. It has to write inside a transaction and be idempotent, so a retry after a network timeout does not create a duplicate. And it has to respect what is already on the table: foreign keys, unique indexes, triggers, and any ON UPDATE CASCADE relationship that quietly fans one write out across several tables. We walked through that fan-out in cascading changes and best practices, and it applies unchanged to MariaDB.

Then there is the connection budget. max_connections on a busy primary is a finite number, often set between 150 and 500, and it is already spoken for by the application's pool. An integration that opens a connection per worker, per table, or per sync run is competing with the thing that pays the bills. A platform should hold a small pooled count, release connections quickly, and back off rather than pile up when the server is under load. Ask for that number before you sign anything. The configuration walkthrough in the MySQL two-way sync guide covers the same settings, and most of it transfers directly.

Schema drift, replica lag, and Galera

Databases move. Someone adds a column, widens a VARCHAR, renames a field, or runs an online schema change that rebuilds the table under a new name and swaps it in. If the sync engine holds a cached picture of the schema and has no way to notice, one of two things happens: it starts writing into a column that no longer means what it did, or it stops.

  • DDL in the binary log. ALTER TABLE shows up in the stream. An engine that reads it can update its own mapping and surface new fields as unmapped, instead of failing on the next row event.
  • Online schema change tools. gh-ost and pt-online-schema-change build a shadow table and cut over. Change capture has to follow the cutover rather than keep reading a table that is about to be dropped.
  • Replica lag. Reading from a read replica takes load off the primary and costs you freshness. Seconds_Behind_Master is an estimate, not a guarantee, and a lagging replica turns a two-way sync into a race.
  • Galera. A Galera cluster is multi-primary with certification-based replication and per-node binary logs. Attach change capture to one pinned node, or the same transaction can be seen twice after a node rejoins.

Origin tracking is what makes the whole thing safe. Every write the platform makes into MariaDB is tagged, so when that row comes back through the binlog a moment later it is recognised as an echo and dropped rather than pushed back out to the CRM. Without it, a two-way sync is an infinite loop with a delay on it.

Book a Stacksync demo: connect MariaDB to Salesforce, HubSpot, and Snowflake with real-time two-way sync

What the integration layer has to own

Put those requirements together and the integration stops being a script attached to one end. It is a tier with its own responsibilities, sitting between the cluster and the systems that read from it.

Three layer stack: the MariaDB cluster with its binary log, GTID position, replicas and connection limit; the sync engine with change capture, field mapping, conflict resolution and row-level write-back; and the business systems above it
The sync engine is a tier, not a cron job bolted to either end.

A shortlist should be tested against these, in a trial, against a copy of a table you actually run:

  • Change capture from the binary log, with a GTID position that survives a restart and a failover, and documented behaviour when that position is no longer available on the server.
  • Row-level write-back inside a transaction, idempotent on retry, through a pooled and capped set of connections.
  • Field-level conflict resolution. When the same field changes in MariaDB and in the CRM in the same minute, a policy decides, not whichever job happened to run last.
  • Schema drift handling. New columns surface as unmapped rather than being silently ignored, and a type change does not corrupt the target.
  • TLS and least privilege. A replication user with REPLICATION SLAVE and SELECT for reads, a separate scoped user for writes, TLS on both, and no copy of your data parked in the vendor's store.
  • An audit trail per write. Which system wrote this value, when, and what it replaced. That is what makes a change defensible six months later.
  • Transforms where they belong. Most mapping should be no-code. The exceptions are not, so the platform should let you drop into Python for the one field that needs a lookup or a format change, without moving the whole integration into a codebase.

One-way ETL is not integration

A pipeline that copies MariaDB into a warehouse every night answers questions about yesterday. It does not keep the account status in the CRM aligned with the row that decides whether the customer can log in. Those are different problems, and only one of them is what people mean when they say the database has to be integrated.

Stacksync connects MariaDB to more than 1,000 systems on a single engine, in real time and in both directions, with change capture from the binary log, row-level write-back, no-code field mapping with Python transforms where you need them, and an audit trail on every write. Start with the MariaDB connector, the pair pages for MariaDB and Salesforce and HubSpot and MariaDB, or the two guides that go with this one: how to sync MariaDB with Salesforce and two-way sync between MariaDB and HubSpot. To see it running against your own schema, book a demo.

Put MariaDB on a two-way sync engine with binary log change capture and row-level write-back

FAQ

Frequently asked questions

Can you sync MariaDB in real time and in both directions?
Yes. Real-time two-way sync with MariaDB works by reading committed row changes from the binary log rather than polling tables, and by writing changes from the other system back into MariaDB one row at a time inside a transaction. The part that makes it safe is origin tracking: every write the platform makes is tagged, so when that same row comes back through the binlog a moment later it is recognised as an echo and dropped instead of being sent onward again. Stacksync does both on one engine, with sub-second latency in normal conditions.
How does change data capture work with MariaDB?
MariaDB already writes every committed row change to its binary log for replication and point-in-time recovery. A change data capture client registers as a replica, reads the stream from a GTID position, and receives inserts, updates, and deletes in commit order without querying your tables at all. Set binlog_format to ROW so events carry before and after images rather than statement text, keep binlog_row_image at FULL if you want field-level conflict resolution, and give the sync a replication user with REPLICATION SLAVE and SELECT.
Is MariaDB different enough from MySQL to matter for integrations?
Yes, at exactly this layer. Both speak the same wire protocol, so a MySQL client connects fine, but MariaDB uses its own GTID format (domain, server, sequence) rather than a source UUID plus transaction number, its JSON type is an alias for LONGTEXT with a check constraint rather than a native binary type, and it ships system-versioned tables that MySQL does not have. A change capture implementation written only against MySQL will eventually trip on one of those.
Will syncing MariaDB use up my max_connections?
It can, if the integration opens a connection per worker, per table, or per sync run. max_connections on a busy primary is often set between 150 and 500 and is already spoken for by the application pool. Ask any vendor for the concrete number of connections their sync holds, whether it pools them, and how it behaves when the server is under pressure. Binary log change capture helps here too, since reading the replication stream costs one connection instead of a query per table per interval.
What happens when the MariaDB schema changes?
A well built sync reads the DDL events that appear in the binary log, updates its own picture of the table, and surfaces new columns as unmapped rather than failing on the next row or writing NULLs into a column that changed meaning. It also has to follow online schema change tools such as gh-ost and pt-online-schema-change, which build a shadow table and cut over, instead of continuing to read a table that is about to be dropped.
Can an integration platform read from a MariaDB replica or a Galera cluster?
It can, with care. Reading from a read replica takes load off the primary and costs you freshness, and replica lag means the sync can read a value it just wrote to the primary and treat it as a fresh change unless every write carries its origin. A Galera cluster is multi-primary with per-node binary logs, so change capture should be attached to one pinned node, otherwise the same transaction can be seen twice after a node rejoins the cluster.

About the author

Ruben Burdin
Ruben Burdin
Founder & CEO

Ruben Burdin is the Founder and CEO of Stacksync, the first real-time and two-way sync for enterprise data at scale. Ruben is a Y Combinator alumni with a strong background in software engineering and business.

All posts by Ruben Burdin

About Stacksync

Stacksync powers real-time, two-way sync between CRMs, ERPs, and databases. Engineers sync data at scale and automate workflows, not dirty API plumbing.

Coworkers laughing in front of a laptop in a casual office setting

Your last integration took months.
Your next one takes a prompt.