pingcap-white
Products
TiDB TiDB

TiDB is effortlessly scalable, open, and trusted to meet the real-time needs of the digital enterprise

cloud icon_black-01 TiDB Cloud

Get the scale and resiliency of TiDB in a fully managed cloud database. Deploy on Amazon Web Services or Google Cloud Platform to quickly build mission critical applications.

Ecosystem Integrations TiKV TiSpark
Solutions
Solution_2-01 Extract Insights Quickly & Easily Solution4 Handle Unpredictable Traffic Surges Solution_1-01 Accelerate Business Growth Solution_3-01 Process Payments
Resources
MySQL Part 1 Good old mysql should be rejuvenated
Thought Leadership
Long Live MySQL: Good Old MySQL Should Be Rejuvenated
tidbcloud_ga
Product
Announcing General Availability of TiDB Cloud
Blog Docs eBooks & Papers Events Videos FAQs Community Developers Trust & Compliance Center
Customers Pricing
Docs Contact Us Sign In
Try TiDB Cloud
TiDB TiDB Cloud
Ecosystem Integrations TiKV TiSpark
Extract Insights Quickly & Easily Handle Unpredictable Traffic Surges Accelerate Business Growth Process Payments
Long Live MySQL: Good Old MySQL Should Be Rejuvenated Announcing General Availability of TiDB Cloud
Blog Docs eBooks & Papers Events Videos FAQs Community Developers Trust & Compliance Center
Customers
Pricing
About Us
Careers
Sign In Community Docs Contact Us Legal Documents
TiDB TiDB
Community EditionEnterprise Subscription
cloud icon_black-01 TiDB Cloud
Get Started

TiDB Community Edition

The open source TiDB platform released under the Apache 2.0 license, and supported by the community

Deploy TiDB on bare-metal using TiUP

See Full Doc >

TiUP is a cluster operation and maintenance tool that makes it easy to deploy TiDB clusters. The following commands will deploy a simple local cluster using TiUP’s “playground” component. Refer to the TiUP documentation for more information about how to use TiUP to deploy a cluster across multiple hosts.

1. Deploy TiDB

tiup playground

2. Access TiDB

mysql --host 127.0.0.1 --port 4000 -u root

Join the TiDB Community Slack>

Deploy TiDB on Kubernetes

See Full Doc >

TiDB can be easily deployed in a Kubernetes environment using TiDB Operator. These commands will install the TiDB Operator CRDs into an existing Kubernetes cluster and deploy a basic TiDB cluster. Refer to the TiDB Operator documentation for more information about how to customize a deployment.

1. Install TiDB Operator

kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/{tidb-operator version}/manifests/crd.yaml
helm repo add pingcap https://charts.pingcap.org/
helm install tidb-operator pingcap/tidb-operator --version {​tidb-operator version}

2. Deploy TiDB and TiDB Monitor

kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/examples/basic/tidb-cluster.yaml
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/examples/basic/tidb-monitor.yaml

3. Access the database

kubectl port-forward svc/basic-tidb 4000 > pf4000.out &
mysql -h 127.0.0.1 -P 4000 -u root

Deploy TiDB on AWS EKS

See Full Doc >

TiDB can be easily deployed to AWS EKS using TiDB Operator and included Terraform scripts to manage EKS infrastructure. These commands will create a basic EKS cluster, install TiDB Operator, and deploy a basic TiDB cluster. Consult the TiDB Operator documentation for more information about how to customize your deployment.

1. Deploy EKS, TiDB Operator, and TiDB cluster node pool

git clone --depth=1 https://github.com/pingcap/tidb-operator && cd tidb-operator/deploy/aws
cp demo.tfvars terraform.tfvars
terraform init
terraform apply

2. Deploy TiDB cluster and monitor

sed "s/CLUSTER_NAME/${cluster_name}/g" manifests/db.yaml.example > db.yaml
sed "s/CLUSTER_NAME/${cluster_name}/g" manifests/db-monitor.yaml.example > db-monitor.yaml
kubectl --kubeconfig credentials/kubeconfig_${eks_name} create -f db.yaml
kubectl --kubeconfig credentials/kubeconfig_${eks_name} create -f db-monitor.yaml

3. Access the database

ssh -i credentials/${eks_name}.pem centos@${bastion_ip}
mysql -h ${tidb_lb} -P 4000 -u root

Deploy TiDB on GCP GKE

See Full Doc >

TiDB can be easily deployed to GCP GKE using TiDB Operator and included Terraform scripts to manage GKE infrastructure. These commands will create a basic GKE cluster, install TiDB Operator, and deploy a basic TiDB cluster. Consult the TiDB Operator documentation for more information about how to customize your deployment.

1. Deploy GKE, TiDB Operator, and TiDB cluster node pool

git clone --depth=1 https://github.com/pingcap/tidb-operator && cd tidb-operator/deploy/gcp
cat small.tfvars >> terraform.tfvars
terraform init
terraform apply

2. Deploy TiDB cluster and monitor

sed "s/CLUSTER_NAME/tidb-cluster/g" manifests/db.yaml.example > db.yaml
sed "s/CLUSTER_NAME/tidb-cluster/g" manifests/db-monitor.yaml.example > db-monitor.yaml
kubectl --kubeconfig credentials/kubeconfig_${gke_name} create -f db.yaml
kubectl --kubeconfig credentials/kubeconfig_${gke_name} create -f db-monitor.yaml

3. Access the database

gcloud compute ssh ${gke_cluster_name}-bastion --zone ${zone}
mysql -h ${tidb_lb} -P 4000 -u root

TiDB Cloud

TiDB Cloud makes deploying, managing, and maintaining your TiDB clusters even simpler with a fully managed cloud instance that you control through an intuitive dashboard. You’ll be able to easily deploy on Amazon Web Services or Google Cloud to quickly build mission critical applications.

Get Started

Enterprise Subscription

TiDB Enterprise Edition is the recommended option to run TiDB on your own infrastructure, which gives you 24/7 technical support from the PingCAP engineers who created TiDB. TiDB Enterprise Edition is trusted by Industry leading organizations around the world.

Learn More
pingcap-white
Products
TiDB TiDB Cloud
Ecosystem
Integrations TiKV TiSpark
Resources
Blog Events Community Docs Developers FAQs Support
Company
About Us News Press Releases Careers Contact Us Legal Documents
Language
中文 日本語
© 2022 PingCAP. All Rights Reserved.
Privacy