How to get your MySQL data ready for agentic AI

Replicate MySQL with binlog CDC using Airbyte so AI agents query a governed warehouse copy of application data instead of your production database.

|
Nov 16, 2026

Summarize with AI:

Airbyte replicates MySQL into your warehouse with binlog-based CDC or a cursor column, so agents query a governed copy of application data, including deletes, without touching the production database.

A lot of the facts an agent needs live in an application database. Orders, accounts, usage records, and feature flags often sit in MySQL tables behind the product. When a support or operations agent needs to know what a customer actually did, that is where the answer is.

Pointing an agent straight at production MySQL is a poor trade, though. Agent queries are hard to predict, they can scan large tables, and they compete with the traffic your application depends on. Access control also gets harder when an agent holds database credentials. A replicated copy in the warehouse fixes all three: agents get the same data, the database keeps its workload, and you decide which tables and columns agents can see.

Why MySQL data matters for agentic AI

  • It is the operational record. Application tables reflect what happened in the product, not a reporting summary of it.
  • It changes constantly. Rows are inserted, updated, and deleted all day, so agents need a copy that keeps up, including deletes.
  • It joins with everything. A user ID in MySQL links to billing, CRM, and support records once they share a warehouse.
  • It is sensitive. Production databases hold personal and financial data that agents should only see through controlled paths.

What agents can do with MySQL data

  1. Customer lookups for support. Answer "what plan is this account on and when did they last log in" from replicated tables.
  2. Operational monitoring. Spot unusual patterns such as stuck orders or failed jobs by querying the warehouse copy on a schedule.
  3. Product questions. Count feature adoption or usage by segment without asking an engineer to write a query against production.
  4. Cross-system answers. Join application data with Stripe, Salesforce, or HubSpot data for account-level summaries.

How Airbyte gets MySQL data ready

Airbyte's MySQL source is a certified connector. It supports all sync modes, and it reads large tables reliably with checkpointing and chunking, so a long initial sync doesn't start over after an interruption.

Replication methods

Change Data Capture (CDC) uses logical replication of the MySQL binlog. Airbyte recommends it whenever possible because it provides:

  • A record of deletions, if needed.
  • Scalable replication to large tables, 1 TB and more.
  • A reliable cursor that doesn't depend on your data. If a table has a primary key but no good updated_at column, CDC can still sync it incrementally.

Standard replication uses a cursor column in the table, such as updated_at. Airbyte recommends against it in general, but it fits when the server doesn't expose the binlog or when tables are small and a snapshot is enough. Standard replication cannot see deleted rows.

Preparing MySQL

  1. Create a dedicated user. For CDC, grant SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT. Standard replication only needs SELECT.
  2. Enable binary logging. Most cloud providers offer this as an option. For self-managed servers, set:
INI
server-id                  = 223344
log_bin                    = mysql-bin
binlog_format              = ROW
binlog_row_image           = FULL
binlog_expire_logs_seconds = 864000

The server-id must be unique and non-zero. Airbyte recommends 864000 seconds (10 days) of binlog retention so a paused or failed sync can resume from where it stopped. Amazon RDS doesn't use binlog_expire_logs_seconds; it uses binlog retention hours, which default to 0, so you must raise that value.

Connecting securely

Airbyte Cloud never connects to a database unencrypted. Choose one of these:

  • SSL mode required (the default), verify_ca, or verify_identity.
  • An SSH tunnel through a bastion host, using an RSA key in PEM format or a password. A tunnel is also the only way for Cloud to reach a database on a private network, and the preferred SSL mode requires one on Cloud.

On Cloud, also allow inbound traffic from Airbyte's IP addresses.

Types

MySQL types map to Airbyte types. Integers become integers, decimals become numbers, dates and times become ISO 8601 strings, binary types become base64 strings, and JSON columns become serialized JSON strings. tinyint(1) maps to boolean by default, with an option to emit it as an integer. Zero dates are converted to null in most cases, which agents should know when they count missing dates.

Choosing what agents see

Replication is also where you decide scope. Select only the tables agents need in the connection, and leave out tables that hold credentials, secrets, or data agents have no reason to read. Because Airbyte writes each table to its own destination table, warehouse permissions can then be granted table by table, so a support agent and a finance agent can see different parts of the same database.

How agents reach MySQL data

MySQL is not listed as an agent connector, so the context layer doesn't offer direct reads against MySQL. Two paths work today:

  • Sync to BigQuery or Snowflake. In Airbyte Cloud, the context layer can give agents read-only SQL access to those destinations, limited to SELECT and SHOW TABLES.
  • Use the Airbyte MCP for pipeline work. At https://mcp.airbyte.com/mcp, agents can create a MySQL connection, discover the source catalog, run a sync, and read job logs. Add ?read-only=true to limit an agent to read-only tools.

What this unlocks

  • Agents that answer from application data without production database access.
  • Deleted rows captured through CDC instead of silently lingering.
  • Large tables replicated with checkpointing.
  • Encrypted connections by default on Airbyte Cloud.
  • Application data joined with billing, CRM, and support data.

Getting started

  1. Create a dedicated MySQL user and enable the binlog with ROW format and enough retention.
  2. Create a MySQL source in Airbyte with CDC and an encrypted connection.
  3. Select the tables agents need and leave the rest out.
  4. Sync to BigQuery or Snowflake, then connect your agent to the Airbyte MCP.

Try Airbyte free or talk to sales about application data for agents.

Frequently asked questions

Should an AI agent query my production MySQL database directly?

It is safer to give agents a replicated copy. Agent queries can be broad and unpredictable, and a warehouse copy keeps that load off the database that serves your application while letting you control which tables agents see.

Which replication method should I use for MySQL?

Airbyte recommends CDC using the binlog whenever possible. It captures deletes, scales to large tables, and doesn't depend on an updated_at column. Standard replication with a cursor column suits servers that don't expose the binlog or small tables you only want snapshots of.

What MySQL settings does CDC need?

Binary logging with binlog_format set to ROW and binlog_row_image set to FULL, a unique non-zero server-id, and enough binlog retention. Airbyte recommends 10 days of retention so a paused or failed sync can resume. On Amazon RDS, set binlog retention hours instead.

Can Airbyte Cloud connect to MySQL without encryption?

No. Airbyte Cloud never connects to a database unencrypted. Use an SSL mode of required, verify_ca, or verify_identity, or connect through an SSH tunnel. You also need to allow inbound traffic from Airbyte's IP addresses.

Can agents read MySQL directly through the Airbyte context layer?

Not at the time of writing. MySQL is not listed as an agent connector. Agents can query a BigQuery or Snowflake destination with read-only SQL through the context layer, and manage MySQL pipelines through the Airbyte MCP.

Integrate with 700+ apps using Airbyte

Move data from 700+ sources into warehouses, lakes, and beyond. Set up pipelines in minutes with pre-built connectors and the Connector Builder.