Advanced Analytica Advanced Analytica: IBOM
← All connectors
MySQL logo

Destination connector

MySQL

Send governed data into MySQL with a clear, practical setup guide.

Version 1.1.2 community alpha

MySQL

You can choose between two connector types for this destination:

  1. destination-mysql connector. Supports SSL and non-SSL connections.
  2. destination-mysql-strict-encrypt connector. Works like the connector above but supports SSL connections only.

Supported sync modes

Sync modeSupported?
Full Refresh - OverwriteYes
Full Refresh - AppendYes
Full Refresh - Overwrite + DedupedYes
Incremental Sync - AppendYes
Incremental Sync - Append + DedupedYes

Get started with Airbyte Cloud

Airbyte Cloud only supports TLS-encrypted connections to your MySQL instance. Otherwise, follow the open-source instructions below.

Get started with Airbyte Open Source

Requirements

You’ll need the following to use the MySQL destination:

  • To sync data to MySQL with typing and deduping: MySQL database 8.0.0 or above
  • To sync data to MySQL without typing and deduping: MySQL 5.7 or above. The bundled MySQL Connector/J 9.x driver officially supports MySQL 8.0 and later. MySQL 5.7 is no longer supported upstream but still works with this connector.
  • When SSL is enabled, the server must accept TLS 1.2 or TLS 1.3. SSL is enabled by default and is the only option on Airbyte Cloud. The driver no longer negotiates TLS 1.0 or TLS 1.1.

Troubleshooting

If the connection fails with Cannot create a PoolableConnectionFactory or an SSL handshake error, check that the server offers TLS 1.2 or later. This can affect older servers, such as an older Amazon RDS MySQL instance. Enable a supported TLS version on the server. You can’t configure the driver to fall back to TLS 1.0 or 1.1.

Network access

Make sure Airbyte can access your MySQL database. If your database is within a VPC, allow access from the IP you’re using to expose Airbyte.

Permissions

You need a MySQL user with CREATE, INSERT, SELECT, DROP permissions. An Airbyte-specific user is strongly recommended for this purpose.

Target database

MySQL doesn’t distinguish between a database and a schema. A database is essentially a schema containing all its tables. Choose an existing database or create a new one. This becomes the default database or schema for tables when the source doesn’t provide a namespace.

Set up the MySQL destination

Before setting up the MySQL destination in Airbyte, set the local_infile system variable to true. Run the SET GLOBAL local_infile = true query as a user with SYSTEM_VARIABLES_ADMIN permission. This is required because Airbyte uses LOAD DATA LOCAL INFILE to load data into the table.

You now have everything needed to configure MySQL as a destination in the UI. You’ll need the following information:

  • Host
  • Port
  • Username
  • Password
  • Database
  • jdbc_url_params (Optional)

Default JDBC URL parameters

Airbyte sets the following JDBC URL parameters. You can’t override them through the jdbc_url_params field:

  • useSSL=true (unless ssl is set to false)
  • requireSSL=true (unless ssl is set to false)
  • verifyServerCertificate=false (unless ssl is set to false)
  • zeroDateTimeBehavior=convertToNull
  • allowLoadLocalInfile=true
  • connectionTimeZone=LOCAL (the connector writes and reads _airbyte_extracted_at in the connector’s own time zone; do not set connectionTimeZone or its alias serverTimezone in jdbc_url_params)

Known limitations

MySQL documentation explains identifier case sensitivity using the lower_case_table_names system variable. One recommendation is:

"It is best to adopt a consistent convention, such as always creating and referring to databases and tables using lowercase names.
 This convention is recommended for maximum portability and ease of use."

Source: MySQL docs

As a result, the Airbyte MySQL destination forces all identifier names to lowercase. This includes table, schema and column names.

Connect through an SSH tunnel

Airbyte can connect to a MySQL instance through an SSH tunnel. This is useful when direct database access is impossible or against security policy. For example, the database might not have a public IP address.

An SSH tunnel connects Airbyte through an intermediate server, also called a bastion server. This server has direct access to the database. Airbyte connects to the bastion, which then connects directly to the database server.

This feature needs additional configuration when you create the destination. The following steps explain each setting.

  1. Configure all destination fields as usual, except SSH Tunnel Method.

  2. SSH Tunnel Method defaults to No Tunnel, which means a direct connection. To use an SSH tunnel, choose SSH Key Authentication or Password Authentication.

    1. Choose Key Authentication when using an RSA private key to establish the SSH tunnel. See below for more information about generating this key.
    2. Choose Password Authentication when using a password to establish the SSH tunnel.

    :::warning Airbyte Cloud requires encrypted communication. Select SSH Key Authentication or Password Authentication if you selected preferred as the SSL Mode. Otherwise, the connection will fail. :::

  3. SSH Tunnel Jump Server Host identifies the intermediate bastion server that Airbyte connects to. Enter a hostname or IP address.

  4. SSH Connection Port is the bastion server port used for the SSH connection. The default SSH port is 22. Use the default unless you’ve explicitly changed the port.

  5. SSH Login Username is the username Airbyte uses to connect to the bastion server. This isn’t the MySQL username.

  6. If you’re using Password Authentication, set SSH Login Username to the previous step’s user password. Leave this blank if you’re using SSH Key Authentication. This isn’t the MySQL password. It’s the password for the OS user that Airbyte uses to run commands on the bastion.

  7. If you’re using SSH Key Authentication, set SSH Private Key to the RSA Private Key used for the SSH connection. Include the full key file contents, starting with -----BEGIN RSA PRIVATE KEY----- and ending with -----END RSA PRIVATE KEY-----.

Namespace support

This destination supports namespaces. MySQL doesn’t distinguish between a database and a schema. The configured database acts as the default namespace.

Changelog

Expand to review
VersionDatePull RequestSubject
1.1.22026-10-2689768Upgrade MySQL Connector/J 8.0.22 to 9.6.0 and pin connectionTimeZone=LOCAL so typing no longer skips records on servers west of UTC (MySQL and MySQL Strict Encrypt destinations).
1.1.12025-08-0463736Use MySQL/MariaDB compatible timestamp format
1.1.02025-03-2550861add support for mariadb
1.0.42025-03-2456355Upgrade to airbyte/java-connector-base:2.0.1 to be M4 compatible.
1.0.32024-12-1849865Use a base image: airbyte/java-connector-base:1.0.0
1.0.32024-06-2640566Remove strict-encrypt variant
1.0.22024-06-2640553Convert prod code to kotlin
1.0.12024-06-2540513Improve error reporting for “access denied” error
1.0.02024-04-2637322Remove normalization and upgrade to DV2 output format
0.3.12024-04-1236926Upgrade to Kotlin CDK
0.3.02023-12-1833468Upgrade to latest Java CDK
0.2.02023-06-2727781License Update: Elv2
0.1.212022-09-1415668Wrap logs in AirbyteLogMessage
0.1.202022-06-1713864Updated stacktrace format for any trace message errors
0.1.192022-05-1712820Improved ‘check’ operation performance
0.1.182022-02-2510421Refactor JDBC parameters handling
0.1.172022-02-1610362Add jdbc_url_params support for optional JDBC parameters
0.1.162022-02-1410256Add -XX:+ExitOnOutOfMemoryError JVM option
0.1.152021-12-018371Fixed incorrect handling “\n” in ssh key
0.1.142021-11-08#7719Improve handling of wide rows by buffering records based on their byte size rather than their count
0.1.132021-09-28#6506Added support for MySQL destination via TLS/SSL
0.1.122021-09-24#6317Added option to connect to DB via SSH
0.1.112021-07-30#5125Enable additionalPropertities in spec.json
0.1.102021-07-28#5026Add sanitized json fields in raw tables to handle quotes in column names
0.1.72021-07-09#4651Switch normalization flag on so users can use normalization.
0.1.62021-07-03#4531Added normalization for MySQL.
0.1.52021-07-03#3973Added AIRBYTE_ENTRYPOINT for kubernetes support.
0.1.42021-07-03#3290Switched to get states from destination instead of source.
0.1.32021-07-03#3387Fixed a bug for message length checking.
0.1.22021-07-03#3327Fixed LSEP unicode characters.
0.1.12021-07-03#3289Added support for outputting messages.
0.1.02021-05-06#3242Added MySQL destination.
Advanced Analytica

Most businesses are sitting on information they can’t use at speed. The people who hold it are busy, and when they leave, the knowledge goes with them. The documents are static, and the processes around them weren’t designed for AI.

Advanced Analytica works with these businesses to turn that information into structured data assets. Once they're integrated, AI systems can govern it, and the business can use it. We bring in the strategy, the specification and the AI skills to rework how the business operates.

MOVE FAST. STAY SAFE.