Mycat2
github.com
- Free plan
- Linux
- Self-hosted
What Mycat2 is
Mycat2 is free, open-source distributed relational database middleware for Linux and self-hosted deployments. It supports distributed SQL queries, the MySQL communication protocol, and multiple backend databases through the Java ecosystem. Its distributed query engine handles MySQL syntax and value types, with rule-based and cost-based optimization plus an independent physical execution engine. Data fragmentation is described as improving query processing capabilities. Users can customize and load sharding, serial number, and load balancing algorithms. A project DSL can manipulate physical query plans, forward SQL, and cache result sets. Mycat2 provides connection pooling, query routing, and load balancing. The README says it currently supports Java 8 only. Release notes for v1.22-2022-6-25 list ClickHouse support for SELECT and INSERT without returning auto-increment values, plus SQL permission interception, RSA encryption for user.json, and inactive-connection recycling with a 180-second default timeout. The repository identifies an Apache License from 2023.8 and links English and Chinese documentation.
Who it suits
Mycat2 suits teams running self-hosted Linux database middleware that need distributed SQL, routing, pooling, sharding, and load balancing. It is relevant to users able to run Java 8.
Good to know, and what to watch
- Free open-source software
- Supports distributed SQL and MySQL protocol
- Customizable sharding and load balancing algorithms
- Provides query routing and connection pooling
- ClickHouse backend supports SELECT and INSERT
- Currently supports Java 8 only
- Latest listed release is v1.22-2022-6-25
- ClickHouse integration does not return auto-increment values
- Self-hosted Linux deployment is required
Plans
Every plan and priceMycat2
Open source
The verdict
Mycat2 offers a customizable middleware layer for distributed relational database setups, with routing, pooling, and query optimization. Java 8 support and the listed release age should be considered during deployment planning.
What the maker publishes
- Backends
- It supports multiple backend databases through the Java ecosystem. source
- Connection handling
- The release notes describe automatic checking and recycling of inactive backend connections, with a default timeout of 180 seconds. source
- Customization
- Sharding, serial number, and load balancing algorithms can be customized and loaded. source
- 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. source
- Download
- The release page lists v1.22-2022-6-25 as the latest release. source
- License
- The repository identifies the project license as Apache License from 2023.8. source
- Product
- Mycat2 is a distributed relational database middleware that supports distributed SQL queries and the MySQL communication protocol. source
- Query controls
- A project DSL manipulates physical query plans and supports SQL forwarding and result set caching. source
- Runtime
- The README says Mycat2 currently supports Java 8 only. source
- Security feature
- The v1.22 release notes list SQL-type permission interception and RSA encryption support for user.json configuration. source
- Sharding
- The project says data fragmentation improves query processing capabilities. source
- SQL engine
- Its distributed query engine supports MySQL syntax and value types, with rule and cost based optimization and an independent physical execution engine. source
- Support
- The repository links English and Chinese documentation hosted on Yuque. source
Checked against the maker's pages on 9 Oct 2026.