Skip to content
Skills Library
Data & analytics · Tool integration

capture-mysql-create

/capture-mysql-create

Create a MySQL CDC capture using flowctl with binlog replication. Use when setting up streaming from MySQL, Amazon RDS MySQL, or Aurora MySQL. Use when user says "capture MySQL", "stream from MySQL", "MySQL CDC", "binlog replication", or "connect MySQL to Estuary".

Licence
Apache-2.0
Last repository change
24.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 24.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Create a MySQL CDC capture using flowctl with binlog replication. Use when setting up streaming from MySQL, Amazon RDS MySQL, or Aurora MySQL. Use when user says "capture MySQL", "stream from MySQL", "MySQL CDC", "binlog replication", or "connect MySQL to Estuary".

Triggers from the description

capture MySQLstream from MySQLMySQL CDCbinlog replicationconnect MySQL to Estuary
Original author description

Create a MySQL CDC capture using flowctl with binlog replication. Use when setting up streaming from MySQL, Amazon RDS MySQL, or Aurora MySQL. Use when user says "capture MySQL", "stream from MySQL", "MySQL CDC", "binlog replication", or "connect MySQL to Estuary".

How it works

  1. Step 0: Load Connector Documentation
  2. Step 1: Gather Requirements
  3. Step 2: Find the Correct Connector Version
  4. Step 3: Help User Complete Prerequisites
  5. Step 4: Create the Capture Spec File
  6. Step 5: Discover and Publish
  7. Step 6: Verify
  8. Troubleshooting
  9. Related Skills
Original SKILL.md headings · 211 lines, 960 words
SKILL.md preview
---
name: capture-mysql-create
description: Create a MySQL CDC capture using flowctl with binlog replication. Use when setting up streaming from MySQL, Amazon RDS MySQL, or Aurora MySQL. Use when user says "capture MySQL", "stream from MySQL", "MySQL CDC", "binlog replication", or "connect MySQL to Estuary".
---

# Create MySQL Capture

Create a MySQL capture using flowctl to stream data from MySQL tables into Estuary collections using Change Data Capture (CDC) via binary log (binlog) replication.

**Applies to**: source-mysql, source-amazon-rds-mysql, source-amazon-aurora-mysql, source-google-cloud-sql-mysql, source-azure-mysql

## Step 0: Load Connector Documentation

Before proceeding, fetch the official connector docs for prerequisites, config reference, and cloud-specific setup.

**Always load the main page:**
https://docs.estuary.dev/reference/Connectors/capture-connectors/MySQL/

**Then load the variant subpage based on the user's MySQL type:**

| Variant | Docs URL |
|---------|----------|
| Self-hosted MySQL | Main page covers this |
| Amazon Aurora MySQL | Main page covers this |
| Amazon RDS MySQL | https://docs.estuary.dev/reference/Connectors/capture-connectors/MySQL/amazon-rds-mysql/ |
| Google Cloud SQL MySQL | https://docs.estuary.dev/reference/Connectors/capture-connectors/MySQL/google-cloud-sql-mysql/ |

Use WebFetch to load these pages. Together they cover:

- Prerequisites (binlog format, user permissions, binlog retention)
- Full config property reference
- Cloud-specific setup instructions
- SSH tunnel configuration
- Network access / IP allowlisting
- Troubleshooting common errors

This skill provides the **flowctl workflow** and **decision logic** that docs don't cover.

## Step 1: Gather Requirements

Before writing any YAML, ask the user:

1. **MySQL variant?** — Self-hosted, Amazon RDS, Aurora MySQL, Google Cloud SQL, or Azure
2. **Network path?** — Direct connection (cloud with IP allowlist), SSH tunnel (private network), Private Link (AWS/Azure/GCP), or ngrok (local dev)
3. **Non-default data plane?** — Most users use the default. Ask if they need a non-default data plane.
4. **Tables to capture?** — All tables or specific subset
5. **History mode?** — Standard CDC (`false`) or full event history (`true`)
6. **DATETIME columns?** — If yes, need timezone config (e.g., `America/New_York`)

## Step 2: Find the Correct Connector Version

Always use the latest numbered version tag. Query the connector registry to find it:

```bash
flowctl raw get --table connector_tags \
  --query 'documentation_url=ilike.*source-mysql*' \
  --query 'select=image_tag,documentation_url' \
  --output yaml
```

Choose the connector image based on the user's MySQL variant:

| Variant | Connector Image |
|---------|----------------|
| Self-hosted / Vanilla | `ghcr.io/estuary/source-mysql` |
| Amazon RDS MySQL | `ghcr.io/estuary/source-amazon-rds-mysql` |
| Amazon Aurora MySQL | `ghcr.io/estuary/source-amazon-aurora-mysql` |
| Google Cloud SQL MySQL | `ghcr.io/estuary/source-google-cloud-sql-mysql` |
| Azure Database for MySQL | `ghcr.io/estuary/source-azure-mysql` |

## Step 3: Help User Complete Prerequisites

Walk the user through prerequisites from the docs loaded in Step 0:

1. **Binlog format** — must be ROW: `SHOW VARIABLES LIKE 'binlog_format';`
2. **Binlog row image** — must be FULL: `SHOW VARIABLES LIKE 'binlog_row_image';`
3. **User permissions** — needs SELECT, REPLICATION CLIENT, REPLICATION SLAVE
4. **Binlog retention** — at least 24-72 hours recommended

For RDS: binlog retention is set via `CALL mysql.rds_set_configuration('binlog retention hours', 72);`

## Step 4: Create the Capture Spec File

Build `flow.yaml` using the config reference from the docs. Minimal required config:

```yaml
captures:
  <tenant>/<path>/source-mysql:
    endpoint:
      connector:
        image: ghcr.io/estuary/source-mysql:<version>
        config:
          address: "<host>:<port>"
          user: "<username>"
          password: "<password>"
          historyMode: false
    bindings: []
```

**Important fields not in minimal config but commonly needed:**
- `timezone: "America/New_York"` — required if tables have DATETIME columns
- `advanced.dbname: "your_app_db"` — required if user can't access the `mysql` system database

For SSH tunnel, add `networkTunnel.sshForwarding` block — see docs for full config.

## Step 5: Discover and Publish

```bash
# Discover tables
flowctl discover --source flow.yaml

# Review the generated bindings
cat flow.yaml

# Publish the capture
flowctl catalog publish --source flow.yaml --auto-approve
```

## Step 6: Verify

```bash
# Check status (expect PENDING → BACKFILLING → OK: Streaming Binlog Events)
flowctl catalog status <tenant>/<path>/source-mysql

# View recent logs
flowctl logs --task <tenant>/<path>/source-mysql --since 5m | jq -c '{ts, message}'

# Read captured data
flowctl collections read --collection <tenant>/<path>/<schema>/<table> | head -10
```

**Status progression:**
1. `PENDING` — normal for ~30 seconds during shard assignment
2. `BACKFILLING` — initial table snapshots
3. `OK: Streaming Binlog Events` — CDC running normally

## Troubleshooting

### "historyMode is required"

**Cause**: Missing `historyMode` field in config

**Fix**: Add `historyMode: false` (or `true` for full event history).

### "Access denied to database 'mysql'"

**Cause**: Capture user can't access the `mysql` system database

**Fix**: Specify an alternative database:
```yaml
config:
  advanced:
    dbname: "your_application_db"
```

### "unsupported DML query" or statement-based binlog error

**Cause**: `binlog_format` is not ROW

**Fix**: `SET GLOBAL binlog_format = 'ROW';` — for RDS/Cloud SQL, update the parameter group/flags.

### "could not find first log file name in binary log index file"

**Cause**: Binlog files purged; connector can't find its last position. Must re-backfill.

**Prevention**: Increase retention — `SET GLOBAL binlog_expire_logs_seconds = 259200;` (72 hours). For RDS: `CALL mysql.rds_set_configuration('binlog retention hours', 72);`

### "log event entry exceeded max_allowed_packet"

**Cause**: A single row/transaction exceeds MySQL's `max_allowed_packet`

**Fix**: `SET GLOBAL max_allowed_packet = 1073741824;` (1GB). For RDS: update via parameter group.

### DATETIME values not permitted or incorrect timestamps

**Cause**: Tables have DATETIME columns but timezone not configured

**Fix**: Add `timezone: "America/New_York"` (or appropriate IANA timezone) to config.

### "Access denied; you need REPLICATION SLAVE privilege"

**Cause**: User lacks replication permissions

**Fix**:
```sql
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'flow_capture'@'%';
FLUSH PRIVILEGES;
```

### Capture halts after ALTER TABLE

**Cause**: Certain schema changes (beyond ADD/DROP COLUMN) stop the connector. DROP TABLE or TRUNCATE TABLE will also halt.

**Fix**: Check logs for the specific error. May need to remove the binding or re-create the capture.

### Capture appears "stuck" for hours

**Cause**: Processing a very large transaction — the capture must process all changes before checkpointing.

**Fix**: Wait for completion. Check logs for progress. For future large operations, batch into smaller transactions.

### Capture stuck in PENDING

Wait 30-60 seconds — this is normal during shard assignment. If still stuck:
```bash
flowctl logs --task <tenant>/<path>/source-mysql --since 5m | jq 'select(.level == "error" or .level == "warn")'
```

## Related Skills

- `connector-disable-enable` — Pause/restart existing captures
- `connector-delete-recreate` — Nuclear option for stuck captures
- `estuary-logs` — Deep log analysis
- `estuary-catalog-status` — Status checking

Versions

The database has no other skills named capture-mysql-create.

Database snapshot: 13.11.2026 · package version 27cb2b3deede (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100capture-postgres-create
    Create a new PostgreSQL CDC capture from scratch using flowctl. Covers all Postgres variants (vanilla, Aurora, RDS, Cloud SQL, Supabase, Neon). Use when user says "capture Postgres", "stream from Postgres", "Postgres CDC", "set up replication slot", or "connect Postgres to Estuary".
  • 100capture-sqlserver-create
    Create a SQL Server CDC capture using flowctl. Use when setting up real-time streaming from SQL Server, Azure SQL, Amazon RDS SQL Server, or Google Cloud SQL. Use when user says "capture SQL Server", "stream from MSSQL", "SQL Server CDC", or "connect SQL Server to Estuary".
  • 100connect-cdc-mysql
    Streams change data capture from MySQL or MariaDB into Redpanda or Kafka using the mysql_cdc input in Redpanda Connect, which replicates row-level changes via binlog. Use when configuring mysql_cdc, setting up binlog replication and an initial snapshot, wiring a checkpoint_cache…
  • 92write-script-mysql
    MUST use when writing MySQL queries.
  • 90mysql
    Plan and review MySQL/InnoDB schema, indexing, query tuning, transactions, and operations. Use when creating or modifying MySQL tables, indexes, or queries; diagnosing slow/locking behavior; planning migrations; or troubleshooting replication and connection issues. Load when using a MySQL database.
  • 100mysql
    MySQL is an open-source relational database server. Use when you need to install MySQL, design tables, add indexes, write queries, set up replication, take backups, or connect from Node.js (mysql2) or Python (mysql-connector-python).

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.