LogoLogo
OverviewQuickstartsHow To GuidesReferenceArticlesSupport
How To Guides
How To Guides
  • How To Guides
  • SETUP
    • Deploy Upsolver on AWS
      • Deployment Guide
      • AWS Role Permissions
      • VPC Peering Guide
      • Role-Based AWS Credentials
    • Enable API Integration
    • Install the Upsolver CLI
  • CONNECTORS
    • Create Connections
      • Amazon Kinesis
      • Amazon Redshift
      • Amazon S3
      • Apache Kafka
      • AWS Glue Data Catalog
      • ClickHouse
      • Confluent Cloud
      • Elasticsearch
      • Microsoft SQL Server
      • MongoDB
      • MySQL
      • PostgreSQL
      • Snowflake
      • Tabular
    • Configure Access
      • Amazon Kinesis
      • Amazon S3
      • Apache Kafka
      • AWS Glue Data Catalog
      • Confluent Kafka
    • Enable CDC
      • Microsoft SQL Server
      • MongoDB
      • MySQL
      • PostgreSQL
  • JOBS
    • Basics
      • Real-time Data Ingestion — Amazon Kinesis to ClickHouse
      • Real-time Data Ingestion — Amazon S3 to Amazon Athena
      • Real-time Data Ingestion — Apache Kafka to Amazon Athena
      • Real-time Data Ingestion — Apache Kafka to Snowflake
    • Advanced Use Cases
      • Build a Data Lakehouse
      • Enriching Data - Amazon S3 to ClickHouse
      • Joining Data — Amazon S3 to Amazon Athena
      • Upserting Data — Amazon S3 to Amazon Athena
      • Aggregating Data — Amazon S3 to Amazon Athena
      • Managing Data Quality - Ingesting Data with Expectations
    • Database Replication
      • Replicate CDC Data into Snowflake
      • Replicate CDC Data to Multiple Targets in Snowflake
      • Ingest Your Microsoft SQL Server CDC Data to Snowflake
      • Ingest Your MongoDB CDC Data to Snowflake
      • Handle PostgreSQL TOAST Values
    • VPC Flow Logs
      • Data Ingestion — VPC Flow Logs
      • Data Analytics — VPC Flow Logs
    • Job Monitoring
      • Export Metrics to a Third-Party System
    • Data Observability
      • Observe Data with Datasets
  • DATA
    • Query Upsolver Iceberg Tables from Snowflake
  • APACHE ICEBERG
    • Analyze Your Iceberg Tables Using the Upsolver CLI
    • Optimize Your Iceberg Tables
Powered by GitBook
On this page
  1. CONNECTORS
  2. Enable CDC

MySQL

This article describes how to enable CDC on your MySQL database.

Last updated 11 months ago

This article guides you through the process of enabling CDC on your MySQL database.

Prerequisites for MySQL

Upsolver supports MySQL 5.6+ and 8.0.x. You can connect to:

  • Generic MySQL (self-hosted)

  • Amazon RDS MySQL

  • Amazon Aurora MySQL

Permissions

In order for Upsolver to read the binlog and initial state of the database, the CDC data source requires the following permissions:

  • SELECT (on the tables that are to be loaded, usually all tables)

  • REPLICATION CLIENT

  • REPLICATION SLAVE

  • RELOAD

  • SHOW DATABASES (this is only necessary if the server was started with the --skip-show-database option)

For more information about creating a user with the correct permissions, see the .

Enabled binlog

The binlog must be enabled in ROW mode. You can follow the to check if it is enabled and configure it if you are using your own MySQL server: ​

If you are using AWS RDS you will need to:

  1. Change the binlog mode to ROW in the parameter group settings for the cluster:

    1. Create a new parameter group based on the base group that matches your database version.

    2. Change the BINGLOG_FORMAT to ROW

    3. Change the database cluster to use the new parameter group and apply the changes.

Ensure binlog duration is long enough

Upsolver constantly reads the binlog's latest events, so generally the binlog retention only needs to be set high enough to handle server interruptions or situations where the data source or compute cluster is paused in Upsolver. It is therefore recommended to set the binlog retention to 1 day, and generally not recommended to set it below 3 hours.

Using AWS RDS, this can be achieved using the following command:

call mysql.rds_set_configuration('binlog retention hours', 24);

Please consult the documentation for your versions of MySQL for custom deployments.

Ensure that are enabled. If not, the binlog will be disabled regardless of the parameter group settings.

Debezium instructions for configuring MySQL
Debezium guide for MySQL
Automated Backups