Freedom251 › Database Proxy Software
Mycat2

What Mycat2 is
Mycat2 is distributed relational database middleware for running on Linux in a self-hosted deployment. It supports distributed SQL queries and the MySQL communication protocol, and connects to multiple backend databases through the Java ecosystem. Its distributed query engine handles MySQL syntax and value types, applies rule-based and cost-based optimization, and uses an independent physical execution engine. The project describes data fragmentation as a way to improve query processing. Mycat2 also supports connection pooling, query routing, and load balancing. Sharding, serial number, and load balancing algorithms can be customized and loaded. A project DSL can manipulate physical query plans, forward SQL, and cache result sets. The README says the runtime supports Java 8 only. The repository identifies an Apache License from 2023.8 and links English and Chinese documentation hosted on Yuque. The release page lists v1.22-2022-6-25 as the latest release. Its notes describe ClickHouse as a backend for SELECT and INSERT, without returning auto-increment values. They also list SQL-type permission interception, RSA encryption for user.json configuration, and automatic checking and recycling of inactive backend connections, with a default timeout of 180 seconds.
Who it suits
Mycat2 suits teams that need self-hosted distributed SQL middleware on Linux, with MySQL protocol support and multiple backend databases through the Java ecosystem. It is also suited to deployments that need customizable sharding or load balancing algorithms and query routing.
What it does well
- Supports distributed SQL queries and the MySQL communication protocol.
- Connects to multiple backends through the Java ecosystem.
- Includes rule-based and cost-based query optimization.
- Supports connection pooling, query routing, and load balancing.
- Sharding and load balancing algorithms can be customized and loaded.
What to know first
- The README says the runtime supports Java 8 only.
- Deployment is self-hosted on Linux.
- ClickHouse support described in the v1.22 notes lacks returned auto-increment values.
Limits
The README says Mycat2 currently supports Java 8 only. For ClickHouse, the v1.22 release notes describe SELECT and INSERT support but say no auto-increment value is returned.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Mycat2 | Open-source software · Java 8 supported | Free |
As github.com lists them, read 9 Oct 2026. The maker's own page has the final word.
Getting started
- Open the Mycat2 project repository.
- Review the linked English or Chinese documentation hosted on Yuque.
- Use the self-hosted Linux deployment route.
- Use Java 8, the runtime version stated in the README.
- Select the free Mycat2 plan at no cost.
Verdict
Choose Mycat2 if you need free, open-source middleware for distributed SQL queries in a self-hosted Linux deployment. Its MySQL protocol support, query engine, and configurable algorithms are central capabilities. Consider its Java 8 runtime requirement and the stated ClickHouse auto-increment limitation when assessing fit.
Questions
How much does Mycat2 cost?
The Mycat2 plan is free. The pricing note identifies it as open-source software.
What platforms does Mycat2 support?
The listed platforms are Linux and self-hosted deployment. The README says Java 8 is currently supported.
Which databases does it support?
The listed supported databases are MySQL and JDBC. The v1.22 release notes also describe ClickHouse as a backend data source for SELECT and INSERT.
Is Mycat2 open source?
Yes. The project is described as open source, and the repository identifies an Apache License from 2023.8.
Does it include connection pooling and query routing?
Yes. Connection pooling and query routing are listed as supported capabilities; load balancing is listed as well.
Where can I find documentation?
The repository links English and Chinese documentation hosted on Yuque.
Facts from Mycat2's own pages
- Backends
- It supports multiple backend databases through the Java ecosystem. · github.com, 9 Oct 2026
- Connection handling
- The release notes describe automatic checking and recycling of inactive backend connections, with a default timeout of 180 seconds. · github.com, 9 Oct 2026
- Customization
- Sharding, serial number, and load balancing algorithms can be customized and loaded. · github.com, 9 Oct 2026
- 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. · github.com, 9 Oct 2026
- Download
- The release page lists v1.22-2022-6-25 as the latest release. · github.com, 9 Oct 2026
- License
- The repository identifies the project license as Apache License from 2023.8. · github.com, 9 Oct 2026
- Product
- Mycat2 is a distributed relational database middleware that supports distributed SQL queries and the MySQL communication protocol. · github.com, 9 Oct 2026
- Query controls
- A project DSL manipulates physical query plans and supports SQL forwarding and result set caching. · github.com, 9 Oct 2026
- Runtime
- The README says Mycat2 currently supports Java 8 only. · github.com, 9 Oct 2026
- Security feature
- The v1.22 release notes list SQL-type permission interception and RSA encryption support for user.json configuration. · github.com, 9 Oct 2026
- Sharding
- The project says data fragmentation improves query processing capabilities. · github.com, 9 Oct 2026
- SQL engine
- Its distributed query engine supports MySQL syntax and value types, with rule and cost based optimization and an independent physical execution engine. · github.com, 9 Oct 2026
- Support
- The repository links English and Chinese documentation hosted on Yuque. · github.com, 9 Oct 2026
Where Mycat2 stands on Freedom251
- Database Proxy Software#11 of 31