MySQL connector limitations
The MySQL connector has limits on supported versions, authentication, binary log settings, read replicas, schema changes, and data types. Review them before you create a pipeline.
General database connector limitations
The limitations in this section apply to all database connectors in Lakeflow Connect. Keep reading for connector-specific limitations.
- When you run a scheduled pipeline, alerts don't trigger immediately. Instead, they trigger when the next update runs.
- When a source table is deleted, the destination table is not automatically deleted. You must delete the destination table manually. This behavior is not consistent with Lakeflow pipelines behavior.
- During source maintenance periods, Databricks might not be able to access your data.
- If a source table name conflicts with an existing destination table name, the pipeline update fails.
- Multi-destination pipeline support is API-only.
- The source system assumes that the cursor columns are monotonically increasing.
- Any single large-object value larger than 10 MiB (10,485,760 bytes) is ingested as an empty value. The limit counts bytes for both text and binary values, so text with multi-byte characters reaches it at fewer than 10,485,760 characters. Oversized text values, such as
LONGTEXTorJSON, become an empty string (''), and oversized binary values become an empty binary value. This applies to the initial snapshot, full refreshes, and change data capture. Other columns in the same row are ingested normally. The pipeline update doesn't fail or report an error, and you can't change this limit.
- Managed ingestion pipelines aren't supported for workspaces in AWS GovCloud regions (FedRAMP High).
- Managed ingestion pipelines aren't supported for FedRAMP Moderate workspaces in the
us-east-2orus-west-1regions.
MySQL versions and variations
The connector supports the following MySQL versions and platforms:
- Amazon RDS for MySQL: Version 5.7.44 and later (both standalone and HA deployments)
- Amazon Aurora MySQL: Version 5.7.mysql_aurora.2.12.2 and later (primary instance only for HA setups)
- Amazon Aurora MySQL Serverless: Supported
- Azure Database for MySQL Flexible Servers: Version 5.7.44 and later (both standalone and HA deployments)
- Google Cloud SQL for MySQL: Version 5.7.44 and later, Version 8.0 and later
- MySQL on EC2: Version 5.7.44 and later
The connector doesn't support MariaDB or other MySQL-compatible databases.
Authentication
-
The connector supports username and password authentication with the following authentication plugins:
- MySQL 5.7.44: The replication user must be created using the
sha256_passwordauthentication plugin. - MySQL 8.0.x and later: Both
sha256_passwordandcaching_sha2_passwordplugins are supported.
- MySQL 5.7.44: The replication user must be created using the
-
The Test Connection button in the UI might fail for users using
sha256_passwordorcaching_sha2_password, even when credentials are correct. This is a known issue. You can still create the connection and proceed with pipeline setup. -
The connector doesn't support the
mysql_native_passwordauthentication plugin. To check and change the user's plugin, see Change the authentication plugin of an existing user.
Network connectivity
The connector doesn't support proxies that terminate MySQL connections, such as Amazon RDS Proxy. Connect to the database instance or, for Aurora, the cluster writer endpoint, not to a proxy endpoint. Through such a proxy, Test Connection can succeed, but change data capture fails when it starts.
Binary log requirements
-
Binary logging must be enabled with
binlog_format=ROWandbinlog_row_image=FULL. -
binlog_row_value_options=PARTIAL_JSONis not supported. With this setting, MySQL logs updates to JSON columns as partial changes instead of full documents. When the connector reads a partial change, it skips the table and reports theINGESTION_GATEWAY_MYSQL_TABLE_SKIPPED_DUE_TO_PARTIAL_JSONerror. This happens on anyUPDATEto a table with a JSON column, even if the update doesn't change a JSON value.To recover, set
binlog_row_value_optionsto an empty value globally and in every MySQL session that writes to the ingested tables. Then run a full refresh of the affected table. If you run the full refresh while the setting is still enabled, the nextUPDATEskips the table again. -
If the binlog is purged before the connector processes changes, you must perform a full refresh of all tables in the pipeline.
-
Databricks recommends 7 days of binlog retention. Setting a lower value might cause binlogs to be cleaned up before the connector processes them.
Read replica support
- Read replica support is only available for Amazon RDS for MySQL, Azure Database for MySQL, and MySQL on EC2.
- The connector doesn't support ingesting from Aurora MySQL read replicas. You must connect to the Aurora primary instance (writer endpoint).
- When you use read replicas, replication lag can affect data freshness.
Pipelines
Don't reconnect an ingestion pipeline to a different source replica or node. See Reconnecting to a different source node.
The following limitations apply to gateway-based pipelines:
- Each ingestion pipeline must be associated with exactly one ingestion gateway. Gateways cannot be shared across pipelines.
- Although the ingestion pipeline runs on serverless compute, the ingestion gateway must run on classic compute.
- The ingestion gateway runs continuously to capture changes before binlogs can be truncated or purged.
Reconnecting to a different source node
The connector checkpoints its progress as a binlog file name and position. Those coordinates are only meaningful on the server that wrote them, so there is no checkpoint that carries across servers.
The connector records the server_uuid of the MySQL server it checkpointed against. If a later update finds a different server_uuid, the update fails with the INGESTION_GATEWAY_MYSQL_SERVER_UUID_CHANGED error. This prevents the connector from resuming from coordinates on the wrong server.
To recover, do one of the following:
- Reconnect the pipeline to the original MySQL server. Ingestion resumes from its existing checkpoint.
- Run a full refresh of all tables in the pipeline. This binds the pipeline to the new server.
Refreshing only some tables doesn't recover the pipeline. The tables you didn't refresh still hold checkpoints from the original server, so the update keeps failing.
To perform a full refresh, see Fully refresh target tables.
Schema evolution and DDL operations
The connector automatically handles new and deleted columns.
- When a new non-spatial column appears in the source, Databricks automatically ingests it. Rows that existed before the column was added have
NULLin that column, unless the column needs to be backfilled (see DDL operation handling). - Spatial data type columns are not supported and can't be ingested.
- When a column is deleted from the source, Databricks doesn't delete it automatically. Instead, the connector uses a table property to set the deleted column to
inactivein the destination. If a column with the same name is later added to the source, the flow fails withCANNOT_WRITE_TO_INACTIVE_COLUMNS. In this case, run a full refresh of the table. A full refresh also removes inactive columns from the destination table.
This is true for new and deleted tables within a schema if you ingest the entire schema.
DDL operation handling
The following table describes how the connector handles DDL operations on a source table. Unless a row says otherwise, when an operation requires a full refresh, the flow for the table fails with an error in the event log, and ingestion of that table stops until you refresh it. Other tables in the pipeline aren't affected.
DDL operation | Behavior | Action required |
|---|---|---|
| The column is added to the destination table automatically. A continuous pipeline restarts itself to pick up the new schema. Existing rows have | None |
| The column is added to the destination table automatically, and no error is raised. A continuous pipeline restarts itself to pick up the new schema. MySQL fills existing rows with the data type's implicit default (for example, | Full refresh, if existing rows need the source values |
| The source populates existing rows with a value that isn't captured in the binlog, so the destination needs a backfill. The flow fails with | Full refresh |
| The table is skipped, with an error in the event log. The flow for this table is marked as failed in the ingestion pipeline. | Drop the column from the source table and then run a full refresh, or remove the table from the pipeline. Excluding the column from the table's column selection isn't enough. |
| The column is set to | None, unless you later add a column with the same name (full refresh) |
| No change is needed in the destination. Ingestion continues. If the statement omits | None, unless the column becomes nullable (see the nullability row) |
| If type widening is enabled on the destination table, the destination column is widened and ingestion continues. Otherwise, the flow fails with | None if type widening is enabled. Otherwise, full refresh |
Any other data type change with | The flow fails with | Full refresh |
Nullability change with | Changing a column from | Full refresh, except for |
Column rename with | The flow fails with | Full refresh |
| Ignored. Default values don't affect rows that are already replicated. | None |
| The table is skipped, with an error in the event log. | Full refresh |
| The table is skipped, with an error in the event log. | Full refresh |
| If the source table has no primary key and the connector uses this unique key to identify rows, the table is skipped, with an error in the event log. Otherwise, the operation is ignored. | Full refresh if the table is skipped. Otherwise, none |
| The table is skipped, with an error in the event log. | Full refresh |
Table options that don't change the logical schema: | Ignored. | None |
Adding, dropping, or renaming non-unique indexes; adding or dropping foreign keys or | Ignored. | None |
The | The table is skipped, with an error in the event log. | Full refresh |
| Ignored. These operations don't remove rows. | None |
| These operations change table data without writing row events to the binlog. The table is skipped, with an error in the event log. | Full refresh |
| The table is skipped, with an error in the event log. | Full refresh |
| These operations change table data without writing row events to the binlog. The table is skipped, with an error in the event log. A full refresh can't read the table while its tablespace is discarded. | Full refresh, after |
| The table is skipped, with an error in the event log. | Full refresh |
| The flow for the old table name fails with an error in the event log. The destination table is kept but is no longer updated. If you ingest the entire schema, the connector ingests the table under its new name as a new destination table. If you select tables individually, the table isn't ingested under its new name. Other tables are still ingested, but each triggered pipeline update fails until you remove the old table name from the pipeline. | None if you ingest the entire schema. If you select tables individually, add the table under its new name to the pipeline and remove the old table name. |
| The flow for | Full refresh of |
| The table is removed from ingestion, with an error in the event log. The flow for this table is marked as failed in the ingestion pipeline. The destination table isn't deleted. If you select tables individually, other tables are still ingested, but each triggered pipeline update fails until you remove the table from the pipeline. | None if you ingest the entire schema. If you select tables individually, remove the table from the pipeline. |
| If the table has no spatial types, it's automatically ingested as a new destination table. If the table has spatial types, it isn't ingested and no flow is created. The event log lists it as an unsupported object ( | None |
Run a full refresh
To perform a full refresh, see Fully refresh target tables. If you configure an auto full refresh policy, the pipeline automatically runs a full refresh of the affected table for the operations in the preceding table that require one. This applies to both gateway-based and integrated CDC pipelines. Automatic full refreshes of a table run at least min_interval_hours apart (24 by default), so a refresh can be delayed until that interval passes. The automatic full refresh doesn't run when you re-add a dropped column, add a spatial column, add a NOT NULL column without a DEFAULT clause, or swap tables with RENAME TABLE. After DISCARD TABLESPACE, the automatic full refresh fails because the table can't be read until you run IMPORT TABLESPACE.
Staging
The staging catalog can't be a foreign catalog.
Tables and data types
- Databricks recommends ingesting 250 or fewer tables per pipeline. However, there is no limit on the number of rows or columns that are supported within these objects.
- MySQL is a two-level namespace. The
source_schemaandsource_tablenames are case-sensitive. - Although you can ingest from multiple source schemas in one pipeline, you can't ingest two tables of the same name to the same destination schema. For example, you can't ingest both
schema1.customersandschema2.customersto the same destination schema. However, you can ingest them to different destination schemas using a multi-destination pipeline. - Spatial data types (GEOMETRY, POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION) are not supported. If spatial columns are present in selected tables, the table is skipped, with an error in the event log.
Character sets and collation
The connector decodes character columns (CHAR, VARCHAR, and TEXT types) using each column's MySQL character set and writes the values to the destination as UTF-8.
Unsupported character sets
The connector supports all MySQL character sets except the following:
armscii8, dec8, geostd8, hp8, keybcs2, and swe7.
If a selected table has a character column that uses an unsupported character set, the connector skips the table and records an INGESTION_GATEWAY_TABLE_SKIPPED_DUE_TO_UNSUPPORTED_CHARSET error in the event log. Other tables in the pipeline continue to ingest. To ingest the table, convert the affected columns to a supported character set, such as utf8mb4.
Known issues
- The Test Connection button fails for MySQL users with
sha256_passwordorcaching_sha2_passwordauthentication, even when credentials are valid. This is a known limitation. You can still create connections and pipelines.