Mycat2
github.com
What it is
Mycat2 is free, open-source distributed relational database middleware for Linux and self-hosted deployment. It supports distributed SQL queries and the MySQL communication protocol while connecting to multiple backend databases through the Java ecosystem. Its query engine handles MySQL syntax and value types, rule- and cost-based optimization, and an independent physical execution engine. Data fragmentation is described as improving query processing. Users can customize and load sharding, serial-number and load-balancing algorithms. A project DSL manipulates physical query plans, forwards SQL and caches result sets. The README currently supports Java 8 only. Release notes for v1.22-2022-6-25 list ClickHouse as a backend for SELECT and INSERT, without returning auto-increment values. They also describe SQL permission interception, RSA encryption for user.json, and recycling inactive backend connections after a default 180-second timeout. The repository identifies an Apache License from 2023.8.
Spec sheet
- Product
- Mycat2 is a distributed relational database middleware that supports distributed SQL queries and the MySQL communication protocol.Read 9 Oct 2026 · github.com
- Support
- The repository links English and Chinese documentation hosted on Yuque.Read 9 Oct 2026 · github.com
- License
- The repository identifies the project license as Apache License from 2023.8.Read 9 Oct 2026 · github.com
- Backends
- It supports multiple backend databases through the Java ecosystem.Read 9 Oct 2026 · github.com
- Connection handling
- The release notes describe automatic checking and recycling of inactive backend connections, with a default timeout of 180 seconds.Read 9 Oct 2026 · github.com
- Customization
- Sharding, serial number, and load balancing algorithms can be customized and loaded.Read 9 Oct 2026 · github.com
- Database integration
- The v1.22 release notes say ClickHouse is supported as a backend data source, with SELECT and INSERT supported and no auto-increment value returned.Read 9 Oct 2026 · github.com
- Download
- The release page lists v1.22-2022-6-25 as the latest release.Read 9 Oct 2026 · github.com
- Query controls
- A project DSL manipulates physical query plans and supports SQL forwarding and result set caching.Read 9 Oct 2026 · github.com
- Runtime
- The README says Mycat2 currently supports Java 8 only.Read 9 Oct 2026 · github.com
- Security feature
- The v1.22 release notes list SQL-type permission interception and RSA encryption support for user.json configuration.Read 9 Oct 2026 · github.com
- Sharding
- The project says data fragmentation improves query processing capabilities.Read 9 Oct 2026 · github.com
- SQL engine
- Its distributed query engine supports MySQL syntax and value types, with rule and cost based optimization and an independent physical execution engine.Read 9 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Free open-source middleware
- Supports distributed SQL and MySQL protocol
- Customizable sharding and load balancing
- Provides query routing and connection pooling
- ClickHouse backend supports SELECT and INSERT
Limits
- README supports Java 8 only
- Latest listed release is v1.22-2022-6-25
- Self-hosted deployment requires infrastructure
- ClickHouse backend lacks auto-increment return
Who it suits
It suits Linux teams running their own database infrastructure and needing distributed SQL, routing, pooling or load balancing. Java 8 compatibility is a key runtime requirement.
Verdict
Mycat2 provides configurable distributed database middleware without a license fee. Its Java 8 requirement and self-hosted model should be checked against your environment.
Where Specifiction places it
- Database Proxy Software#13 of 317.6