Skip to main content
Cursor Follower

Local MySQL to ClickHouse Cloud with ClickPipes CDC

Quick answer: ClickPipes can load an initial MySQL snapshot and continue capturing inserts, updates, and deletes through CDC. This guide walks through the setup without exposing connection addresses, credentials, or account identifiers.

Last updated: September 2026

The objective

Analytics teams need more than a one-time data copy. In this proof of concept, a local MySQL events table was connected to ClickHouse Cloud through ClickPipes for MySQL. The pipeline completed an initial snapshot and then captured a new MySQL record through change data capture (CDC).

Because the MySQL server ran on a private laptop, it was not directly reachable by ClickHouse Cloud. A temporary TCP tunnel provided the intermediate connectivity path for the learning POC. Connection addresses, passwords, and account identifiers are intentionally excluded.

Architecture

Local MySQL
Temporary TCP endpoint
ClickHouse ClickPipe
Cloud destination table

ClickPipes is the managed ingestion component: it performs the initial snapshot and then reads MySQL binary logs for future changes. It supports one-time loads, CDC-only replication, or both. For production, use a protected path such as private networking or SSH tunnelling rather than a temporary public endpoint.

Step 1: Prepare MySQL for CDC

The source table needs a primary key, and MySQL must use row-based binary logging. The configuration below provides the information CDC needs to interpret inserts, updates, and deletes.

RequirementSettingWhy it matters
Binary logginglog_bin = ONMakes changes available to CDC.
Binlog formatROWCaptures row-level events.
Row imageFULLSupplies complete changed-row values.
Row metadataFULLSupplies column metadata.
GTID modeONProvides durable replication positioning.

Use a dedicated, least-privilege MySQL replication account. Do not use the MySQL root account.

Step 2: Enter ClickPipe connection details

In ClickHouse Cloud, open Data sources โ†’ ClickPipes โ†’ New, choose MySQL, and enter the temporary endpoint host and port together with the dedicated MySQL replication user. Select Initial load + CDC so existing data and later changes are both processed.

ClickPipe MySQL connection fields
ClickPipe connection form: host, port, user, password, TLS, and replication mode.

Step 3: Configure the pipe

Use the configuration page to set the change sync interval and control the initial-load behaviour. Start with defaults for a POC; tune parallelism and batch sizes only after measuring source impact and throughput.

ClickPipe configuration settings
ClickPipe settings for the initial snapshot and CDC sync.

Step 4: Choose the database and source tables

Choose an existing ClickHouse database or create a dedicated destination database. Expand the source schema, select the table to replicate, and continue through the wizard.

Destination database and source tables
Destination database creation and source-table selection.

Step 5: Review permissions and create the ClickPipe

ClickPipes creates a dedicated ClickHouse user for writing data. Select the appropriate destination role, review the configuration, and choose Create ClickPipe.

ClickPipe permissions review
Permission review before the ClickPipe is created.

Validate the initial load and CDC

After the initial snapshot completes, insert a controlled test record into MySQL. Then validate that it has arrived in the ClickHouse destination table:

SELECT event_id, event_time, event_name, product, amount, region
FROM <destination_database>.<destination_table>
WHERE event_id = <cdc_test_event_id>;

The POC confirmed that an inserted source record was captured after the snapshot, proving that the pipe continued as CDC rather than ending as a one-time copy.

Production note: Replace temporary public connectivity with private networking or an SSH tunnel, use TLS, retain binary logs long enough for recovery, monitor ClickPipe logs and table statistics, and test inserts, updates, deletes, and schema changes before production release.

Conclusion

ClickPipes offers a managed route from MySQL to ClickHouse Cloud for both historical data and ongoing changes. With a CDC-ready MySQL source and secure connectivity, the resulting ClickHouse table is ready for SQL analytics and BI reporting.

Learn more in the official ClickPipes for MySQL CDC documentation.

Burning Questions
About CelestInfo

Simple answers to make things clear.

Absolutely. CelestInfo supports integration with a wide range of industry-standard software and tools.

We implement enterprise-grade encryption, access controls, and regular audits to ensure your data is safe.

Insights are updated in real time as new data becomes available.

Still have questions?

Get Assistance

Ready? Let's Talk!

Get expert insights and answers tailored to yourbusiness requirements and transformation.

Get Assistance