Skip to content

MySQL

LIVE Source

PortPilot reads every table you select from one MySQL database and loads it into your destination. Tables with a primary key and an updated_at column sync incrementally; the rest are re-read in full on each sync. Rows stream through an unbuffered server-side cursor, so large tables don’t load into memory at once.

Works with MySQL, MariaDB, Amazon RDS and Aurora MySQL, Cloud SQL for MySQL and Azure Database for MySQL, as long as PortPilot can reach the server over the network.

FeatureSupportedNotes
Incremental sync Partly Tables with a primary key and an updated_at column; others are re-read.
Captures deletes No Records deleted in the source stay in the destination.
Custom fields Yes Every column of every selected table.
Table selection Yes Choose which tables to sync.
New columns added automatically Yes Columns that appear in the source are added to the destination table.
Re-sync Yes A full refresh re-reads every selected table.
  1. Create a read-only user for PortPilot:

    CREATE USER 'portpilot'@'%' IDENTIFIED BY '<strong password>';
    GRANT SELECT, SHOW VIEW ON <database>.* TO 'portpilot'@'%';

    Granting on <database>.* also covers tables created later. Restrict '%' to PortPilot’s egress IPs if your security policy requires it.

  2. Allow network access. Allowlist PortPilot’s egress IPs (shown on the connection screen) in your firewall, security group or authorized networks. With a bring-your-own-cloud deployment, allow traffic from your own PortPilot agent’s network instead.

  3. Use TLS. PortPilot connects over TLS unless you turn ssl off.

In the app, go to Connectors → New connector → MySQL, fill in the fields below and click Test connection. The test checks network reachability, login, and lists the tables PortPilot can see.

Field Required Default Description
host Yes — Hostname or IP address of the server.
port Yes 3306 Port number.
database Yes — The database (schema) to replicate. One per connector.
user Yes — The read-only user created above.
password Yes — Stored write-only in the data plane’s secret store; PortPilot can’t read it back.
ssl No true Connect over TLS.
replication_key_columns No ["updated_at"] Columns to sync incrementally on, in priority order. [] re-reads every table on every sync.

Then pick a destination, a sync frequency and the tables to sync, and click Create & start initial sync.

PortPilot replicates your tables as they are: one destination table per source table, same column names, primary key copied from the source. tinyint(1) lands as a boolean; every other type (varchar, text, enum, datetime, …) lands as a string.

Type mapping (13 source types)
Source typeLands as
bigintinteger
bitboolean
decimalnumber
doublenumber
floatnumber
intinteger
integerinteger
jsonobject
mediumintinteger
numericnumber
realnumber
smallintinteger
tinyintinteger

Any type not listed lands as a string.

Datetimes land as strings; BigQuery loads them as TIMESTAMP/DATE, other destinations as text. decimal lands in a floating-point column.

Table has Each sync Write mode
Primary key and an updated_at (datetime, timestamp, date or integer) column Rows where updated_at >= the previous maximum Upsert on the primary key
Primary key, no updated_at Whole table Upsert on the primary key
No primary key Whole table Replace (truncate and load)

The first sync of every table reads it in full. Change replication_key_columns if your application tracks changes in a different column (for example ["modified_at", "updated_at"]).

  • Deletes aren’t replicated. PortPilot reads tables with queries, not from the binlog, so a row deleted at the source stays in the destination. Use soft deletes if you need them downstream.
  • updated_at must change on every write. Declare it TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP so MySQL maintains it. Rows updated without touching it are missed by incremental syncs.
  • tinyint(1) is a boolean. MySQL’s convention for booleans, so PortPilot types it as one. If you store small numbers in tinyint(1), widen it to tinyint(4).
  • decimal precision. decimal columns land in a floating-point column, so values with more than ~15 significant digits lose precision. Datetimes land as text (except in BigQuery); cast them in your warehouse.
  • Long syncs hold a connection. The streaming cursor keeps one connection open per table until it has been read. Make sure wait_timeout and net_write_timeout allow your largest table to finish, or point PortPilot at a read replica.
  • Large tables without a primary key are re-read and replaced in full on every sync, which costs compute you pay for. Add a primary key where you can.