Skip to content

PingCAP

Distributed, MySQL-compatible SQL database with row and columnar storage for HTAP

Permissive (OSI) · Apache-2.0

Listed by , founder & editor

76

Health

Thriving

Overview

Stars

40,769

Last commit

today

Nov 2026

Repository age

11 years

since Sep 2015

Latest version

v7.5.8

Sep 2026

Contributors

–

25 active in 90 days

Releases

6

last 12 months

Docker pulls

9.7M

pingcap/tidb

Language

Go

TiDB is a distributed SQL database written in Go and licensed under Apache 2.0. It speaks the MySQL 8.0 protocol, so existing applications, frameworks and tools can connect with few or no code changes. Data is replicated with the Raft consensus protocol, and transactions use two-phase commit across nodes.

Compute and storage are separate layers, so you can scale each on its own by adding nodes or resources without downtime. For mixed workloads it offers two storage engines: TiKV for rows and TiFlash for columns. TiFlash replicates from TiKV in real time, and the TiDB server picks the engine that fits each query.

You can run it on a local playground, on bare servers, or on Kubernetes with TiDB Operator. A Docker image is available, and a managed TiDB Cloud service exists as well.

It is a self-hostable alternative to Google Cloud Spanner and a partial alternative to Amazon Aurora for teams that want a MySQL-compatible distributed database.

Who it's for

Teams outgrowing a single MySQL server

MySQL 8.0 compatibility lets you move applications over and scale out by adding nodes.

Skip if: Your data fits comfortably on one MySQL or PostgreSQL instance and you want minimal operations.

Platform teams running Kubernetes

TiDB Operator automates cluster operations on your own Kubernetes environment.

Skip if: You do not run Kubernetes and prefer a fully managed cloud database.

Analytics-heavy application developers

TiFlash lets you run analytical queries on fresh transactional data without a separate pipeline.

Skip if: You need a dedicated data warehouse with its own tooling.

The problem it solves

Single-node relational databases hit limits on size, throughput and availability. Sharding MySQL by hand is costly. TiDB spreads data and transactions across nodes while keeping the MySQL interface.

Strengths

  • Compatible with MySQL 8.0 protocol, frameworks and tools
  • Raft replication with automated failover across replicas
  • Row store (TiKV) and column store (TiFlash) in one system
  • Scales out or up without downtime, compute separate from storage
  • Apache 2.0 license, with Docker image and Kubernetes operator

Trade-offs

  • MySQL dialect only; no PostgreSQL mode or GoogleSQL
  • No TrueTime-style external consistency like Spanner
  • No native integration with AWS or Google Cloud managed services
  • A multi-component cluster is more work to run than one database server

PingCAP replaces

Self-host PingCAP

Self-hostable
Yes
Docker image
pingcap/tidb
Hosted plan
From $400/month · pricing

In the community

Frequently asked questions

Is TiDB free?

Yes. The source is under the Apache 2.0 license, including enterprise-grade features. A managed TiDB Cloud service is also offered as a paid option.

Can I self-host it?

Yes. You can run it locally, on your own servers, or on Kubernetes using TiDB Operator.

Is it compatible with MySQL?

It is compatible with MySQL 8.0, so most applications and tools work with little or no change.

What does it replace?

It is a direct replacement for Google Cloud Spanner in many cases and a partial one for Amazon Aurora.

Other Amazon Aurora alternatives

Compare all 2 Amazon Aurora alternatives →

Similar tools in Relational databases

DbGate

Relational databases

Desktop and web client for SQL and NoSQL databases, for developers working across engines

7.4k 496 yesterday Active GPL-3.0

rqlite

Relational databases

Distributed SQLite-based relational database with Raft replication for fault-tolerant apps

18k 829 today Thriving MIT

cockroach

Relational databases

33k 4.2k 2 months ago Slowing Unknown

DB Browser for SQLite

Relational databases

Desktop editor for SQLite files, with a spreadsheet-style view for people who avoid SQL

25k 2.4k yesterday Active MPL-2.0 and GPL-3.0+

citus

Relational databases

PostgreSQL extension that shards tables across nodes for multi-tenant and analytics

13k 812 today Thriving AGPL-3.0

Yugabyte

Relational databases

Distributed PostgreSQL-compatible SQL database for multi-region, fault-tolerant apps

11k 1.4k today Thriving Apache-2.0 + open core

Replaces Amazon AuroraGoogle Cloud Spanner