Quick verdict
Keep MySQL as the system of record for an application: InnoDB gives row-level locking, MVCC transactions and enforced keys. Add ClickHouse when analytical queries over large event, log or history tables are slowing MySQL down or are simply too large for it, and feed it from MySQL with change data capture (ClickPipes in ClickHouse Cloud, or a binlog-based tool for self-hosted ClickHouse). If you would rather not run a second database and can use Oracle's cloud service, MySQL HeatWave adds an in-memory analytics engine to managed MySQL. Do not plan around ClickHouse's MaterializedMySQL engine: it was removed in release 25.1.
ClickHouse is an open source, column-oriented database for real-time analytics, licensed under the Apache License 2.0, self-hosted or used as ClickHouse Cloud. Its latest release is 26.9 (21 September 2026). Its design (MergeTree storage, unenforced sort keys, mutation-based updates) is covered in detail in ClickHouse vs PostgreSQL; this page focuses on how it relates to MySQL.
MySQL is Oracle's open source relational database. MySQL Community Server is GPLv2, with commercial editions sold by Oracle. Its default storage engine, InnoDB, stores rows in a clustered index on the primary key, supports ACID transactions with MVCC and row-level locking, and defaults to the REPEATABLE READ isolation level. 8.4 and 9.7 are the LTS release lines and 26.7 is the current Innovation release. Oracle's managed service, MySQL HeatWave, adds an in-memory analytics engine.
Side by side
| Aspect | ClickHouse | MySQL |
|---|---|---|
| Designed for | Analytical (OLAP) queries over large, mostly append-only data | Transactional (OLTP) application workloads |
| Storage | Columnar MergeTree tables, compressed per column | InnoDB row store, clustered on the primary key |
| Keys and constraints | Primary key sets sort order; uniqueness not enforced | Primary keys, unique keys and foreign keys enforced by InnoDB |
| Row-level changes | Lightweight DELETE and beta lightweight UPDATE; heavier changes via mutations or engine patterns | Ordinary UPDATE, DELETE and ON DUPLICATE KEY UPDATE inside transactions |
| Speaking MySQL | MySQL wire protocol interface; MySQL table engine, database engine and mysql() table function to read and write MySQL |
Native |
| Replication from MySQL | MaterializedMySQL removed in 25.1; ClickPipes MySQL CDC (GA September 2026) in ClickHouse Cloud | Native binary log replication, Group Replication, InnoDB Cluster |
| Built-in analytics alternative | Not applicable | MySQL HeatWave (managed, on OCI, AWS and Azure) adds an in-memory columnar accelerator |
| Licence | Apache License 2.0 | GPLv2 Community Server; commercial editions from Oracle |
| Main trade-off | A second system to feed and operate, with a different update and key model | Row storage is not designed for scans over very large tables |
Key differences
Columnar OLAP versus InnoDB OLTP
InnoDB stores each row together, ordered by the primary key, with secondary indexes pointing back to it. That makes reading or changing one order, one user or one booking cheap, and lets many sessions do so concurrently under MVCC and row locks. It also means a query that aggregates one or two columns over hundreds of millions of rows must read whole rows.
ClickHouse stores each column separately, sorted by the table's ORDER BY key and compressed, and its documentation describes it as built for high ingest rates and large analytical scans. The cost is the model described on our ClickHouse vs PostgreSQL page: the primary key does not enforce uniqueness, updates are mutations or patch parts rather than in-place row changes, and multi-statement transactions are experimental. In our view, that makes ClickHouse a poor replacement for the MySQL database behind an application and a strong complement to it.
How ClickHouse talks to MySQL
ClickHouse has several documented MySQL integration points, and they do different jobs:
- MySQL wire protocol interface. ClickHouse can accept connections from MySQL clients, configured with the
mysql_portsetting on self-managed servers (the documentation's example uses port 9004) or enabled per service in ClickHouse Cloud, where it exposes port 3306. It is aimed at tools that lack a native ClickHouse connector; the docs list Looker Studio, Tableau Online and QuickSight as validated. Limitations include no prepared statements, some types sent as strings and possible TLS SNI issues, and the docs recommend a native driver where one exists. This makes ClickHouse reachable by MySQL clients; it does not make ClickHouse behave like MySQL. - MySQL table engine and
mysql()table function. These runSELECTandINSERTagainst a table on a remote MySQL server. Simple comparison conditions inWHEREare sent to MySQL; other conditions andLIMITare applied in ClickHouse after the MySQL query finishes, so large unfiltered reads move a lot of data. - MySQL database engine. Maps a whole remote MySQL database so its tables can be listed and queried;
RENAME,CREATE TABLEandALTERare not supported through it.
-- ClickHouse: one-off copy of a MySQL table into a local MergeTree table
CREATE TABLE orders_ch
ENGINE = MergeTree
ORDER BY (customer_id, created_at)
AS SELECT * FROM mysql('mysql-host:3306', 'shop', 'orders', 'reader', 'secret');These suit one-off loads, periodic batch copies and joining small MySQL reference tables. They are not change data capture: rows updated or deleted in MySQL after the copy are not reflected.
Keeping ClickHouse in sync: MaterializedMySQL is gone, use CDC
Older guides recommend the MaterializedMySQL database engine, which read MySQL's binary log and replicated tables into ClickHouse. ClickHouse's own changelog described it as an unsupported, experimental feature, and the 25.1 release (28 January 2025) lists as a backward-incompatible change that "the obsolete MaterializedMySQL database engine has been removed and is no longer available". It does not appear in the current database engine documentation. Do not start new work on it, and plan a migration if you still run an older release that depends on it.
The documented replacements are:
- ClickPipes MySQL CDC (ClickHouse Cloud only). ClickHouse announced it as generally available on 2 September 2026, for all Cloud tiers. It performs an initial load and then continuous replication from the binary log, from Amazon RDS and Aurora MySQL, Google Cloud SQL for MySQL, Azure Database for MySQL Flexible Server, self-hosted MySQL and MariaDB. ClickHouse states that new pipes require GTID-based replication and at least 72 hours of binlog retention.
- Self-managed pipelines, for self-hosted ClickHouse: a binlog-based CDC tool streaming changes (often through Kafka) into ClickHouse tables, or scheduled batch copies with the
mysql()table function.
Whichever you choose, updates and deletes arriving from MySQL must be modelled in ClickHouse, commonly with a ReplacingMergeTree keyed on the MySQL primary key with a version column, deduplicated at merge time or at query time with FINAL:
-- ClickHouse: target table for rows replicated from MySQL
CREATE TABLE orders_replica (
order_id UInt64,
status String,
amount Decimal(10,2),
updated_at DateTime,
_version UInt64
) ENGINE = ReplacingMergeTree(_version)
ORDER BY order_id;
SELECT status, count() FROM orders_replica FINAL GROUP BY status; The alternative: MySQL HeatWave
If you want analytical speed-ups without a second database, Oracle's managed MySQL HeatWave is the MySQL-side option. Oracle's documentation describes a DB System running MySQL Enterprise Edition plus a HeatWave Cluster that holds data in memory in a hybrid columnar format and processes queries with vectorised execution. Changes made in the DB System are propagated to the HeatWave Cluster automatically, so there is no CDC pipeline to build, and applications keep using MySQL SQL. HeatWave also includes Lakehouse (querying files in object storage), AutoML and GenAI features, and runs on OCI, AWS and Azure.
The trade-offs are that HeatWave is a cloud service only, not something you add to self-hosted MySQL Community Server, and that it ties analytics to Oracle's service and pricing. ClickHouse is open source, can be self-hosted, and suits event and log data that never lived in MySQL. In our view, HeatWave is worth evaluating first when the analytics are over data that already lives in MySQL and your team wants one system; ClickHouse is the stronger fit when analytical data comes from many sources or must stay portable.
Pricing and licensing
ClickHouse open source is free under the Apache License 2.0. ClickHouse Cloud is billed per compute unit-hour and per TB-month of storage, varying by plan (Basic, Scale, Enterprise), cloud and region; see ClickHouse vs PostgreSQL for the plan structure. MySQL CDC ClickPipes are billed on top: ClickHouse's billing documentation lists USD 0.10 per GB for initial load or resync and USD 0.20 per GB for continuous replication, plus CDC compute of USD 0.20 per hour on Scale and Enterprise (USD 0.10 per hour on Basic), shared across all CDC pipes in a service. MySQL CDC billing started on 1 September 2026.
MySQL Community Server is free under GPLv2. Oracle does not publish prices for MySQL Standard, Enterprise or Cluster editions on the product pages we checked. MySQL HeatWave is billed as a cloud service at OCI, AWS or Azure rates; we could not read Oracle's HeatWave price list reliably, so we do not quote figures. Other managed MySQL services (Amazon RDS and Aurora, Google Cloud SQL, Azure Database for MySQL) are priced by each provider.
Pricing checked on the vendors' official pages on 7 October 2026. Prices change; confirm before buying.
Where each one leads
ClickHouse strengths
- Columnar, compressed storage designed for large analytical scans and high ingest rates
- Reads and writes MySQL directly through its MySQL table engine, database engine and table function
- Accepts MySQL-protocol clients, useful for BI tools without a ClickHouse connector
- Managed MySQL CDC through ClickPipes in ClickHouse Cloud, generally available since September 2026
- Apache 2.0 licence; self-hosted or managed
MySQL strengths
- InnoDB ACID transactions with MVCC, row-level locking and enforced keys
- Simple, efficient row-level UPDATE, DELETE and upserts for application data
- Native replication, Group Replication and InnoDB Cluster for high availability
- Wide hosting and managed-service support, including HeatWave for in-database analytics
- GPLv2 Community Server with LTS release lines
Limitations
ClickHouse limitations
- Not suited to being an application's transactional database: unenforced keys, mutation-based updates, experimental transactions
- MaterializedMySQL was removed in 25.1; replication now needs ClickPipes (Cloud only) or an external pipeline
- The MySQL interface has gaps: no prepared statements, some types returned as strings
- Replicated updates and deletes must be modelled, for example with ReplacingMergeTree and FINAL
MySQL limitations
- Row storage is not designed for aggregating very large tables
- Heavy analytics competes with application traffic unless moved to replicas
- Columnar analytics in the MySQL family requires the HeatWave cloud service
- Commercial edition and HeatWave prices are not published on mysql.com
When to choose each
Choose ClickHouse if
- You need analytics over large event, log, metrics or clickstream tables
- Analytical queries are slowing your MySQL database or replicas
- You want to combine MySQL data with data from other sources for dashboards
- You want an open source analytics engine you can self-host or run on ClickHouse Cloud
Choose MySQL if
- You need the application's system of record with transactions and enforced keys
- Data changes row by row and analytical needs are modest
- You want one database and can use MySQL HeatWave for analytics
- Your framework, hosting or team already standardises on MySQL
When neither is right
- You are choosing a transactional database and want richer SQL and extensions: see MySQL vs PostgreSQL.
- You want managed MySQL on AWS rather than an analytics engine: see Amazon Aurora vs MySQL.
- You want a managed cloud data warehouse rather than a database: see ClickHouse vs BigQuery and ClickHouse vs Snowflake.
- Your analytics are local or file-based: see DuckDB vs PostgreSQL.
Final recommendation
ClickHouse and MySQL are partners more often than rivals. MySQL should stay the application database: InnoDB transactions, enforced keys and simple row-level changes. ClickHouse is the right addition when analytics over large, mostly append-only data outgrows MySQL, provided you budget for a replication pipeline: ClickPipes MySQL CDC on ClickHouse Cloud, or your own binlog-based pipeline when self-hosting. MaterializedMySQL is no longer an option. If you would rather keep one system and can use Oracle's cloud, evaluate MySQL HeatWave first.
Frequently asked questions
Is MaterializedMySQL deprecated?
It has been removed. ClickHouse's changelog lists its removal as a backward-incompatible change in release 25.1 (28 January 2025), and it had previously been described as an unsupported, experimental feature. Use ClickPipes MySQL CDC on ClickHouse Cloud or an external CDC pipeline instead.
Can I connect to ClickHouse with a MySQL client?
Yes. ClickHouse implements the MySQL wire protocol, enabled with mysql_port on self-managed servers or from the console in ClickHouse Cloud (port 3306). It does not support prepared statements and returns some types as strings, so ClickHouse recommends a native driver where one exists.
How do I replicate MySQL to ClickHouse?
On ClickHouse Cloud, use the MySQL ClickPipe, which does an initial load and then CDC from the binary log; new pipes need GTID-based replication and at least 72 hours of binlog retention. When self-hosting, use a binlog-based CDC tool or scheduled copies with the mysql() table function, and model updates with an engine such as ReplacingMergeTree.
Can ClickHouse replace MySQL?
Not as an application's transactional database. ClickHouse primary keys do not enforce uniqueness, updates work differently and multi-statement transactions are experimental. It replaces MySQL for analytical queries over large tables.
Should I use MySQL HeatWave or ClickHouse for analytics?
HeatWave keeps analytics inside managed MySQL with automatic propagation of changes, but only as an Oracle cloud service on OCI, AWS or Azure. ClickHouse is open source and portable and suits data from many sources, but needs a pipeline from MySQL.
Sources
- ClickHouse GitHub repository (licence)
- ClickHouse changelog (current releases)
- ClickHouse changelog 2025 (25.1: MaterializedMySQL removed)
- ClickHouse: MySQL interface
- ClickHouse: MySQL table engine
- ClickHouse: MySQL database engine
- ClickHouse: mysql table function
- ClickHouse: MySQL ClickPipe (CDC)
- ClickHouse blog: MySQL CDC connector for ClickPipes is generally available
- ClickHouse: ClickPipes for CDC billing
- MySQL products and editions
- MySQL 8.4 Reference Manual: InnoDB transaction isolation levels
- HeatWave User Guide: About MySQL HeatWave
- HeatWave User Guide: Supported cloud platforms
Checked October 2026.
How we research comparisons: our editorial method.