Book a Demo Start Instantly

We are proud to announce our partnership with Bytebase, the database continuous integration/continuous delivery (CI/CD) solution provider. This partnership will help developers and DBAs of TiDB and TiDB Cloud to more efficiently and safely manage the lifecycle of application database schemas. 

Streamline schema management on TiDB Cloud 

TiDB Cloud is a fully-managed database-as-a-service (DBaaS) offering of TiDB, the most capable, open source, distributed SQL database for building modern applications that are elastic, reliable, versatile, and downright powerful. TiDB’s Hybrid Transactional/Analytical Processing (HTAP) data engine unlocks greater developer productivity with a streamlined architecture while also providing real-time insights into operational data. 

However, provisioning an instance of a cloud database is only the beginning of the lifecycle. As your business grows and changes, you need to modify the database schema (CREATE TABLE, CREATE INDEX) or change data (INSERT, UPDATE, DELETE). If this type of work is sidelined, it affects database performance. Worse, if a wrong statement is issued, such as accidently using the DROP TABLE statement, the business will be interrupted for a long time.

Bytebase is a DevOps tool that gives you a unified web portal to change, query, secure, and administrate the database throughout the application development lifecycle. 

The following is a streamlined database change management flow for TiDB Cloud with Bytebase:

A streamlined data change management flow

  1. DBA, platform, or self-service DevOps engineers provision the database instance on TiDB Cloud.
  2. They then add the instance into Bytebase. Bytebase will then automatically synchronize all the database schema information from the instance.
  3. Each database is transferred to the specific Bytebase project owned by the application team. At this point, the database joins the software development lifecycle (SDLC) and is ready to be used by application developers. This way, application development teams can collaborate and be involved in database change management. 

A more codified workflow with Terraform

Terraform is an Infrastructure-as-Code tool that defines and configures infra resources in a repeatable and predictable manner. This reduces human error, especially for large-scale infra management. Since both TiDB Cloud and Bytebase are verified Terraform providers, the workflow described above can be more streamlined with code (GitOps).

A more codified workflow with Terraform

  1. Provision and configure TiDB Cloud instances with TiDB Cloud Terraform Provider.  For more details, see TiDB Cloud Terraform Integration Overview.
    For example, the following code creates a TiDB Cloud Serverless resource:
     terraform {   required_providers {     tidbcloud = {       source  = "tidbcloud/tidbcloud"       version = "~> 0.1.0"     }   }   required_version = ">= 1.0.0" } # Instructions for getting an API Key # # You can also pass the keys through environment variables: # export TIDBCLOUD_PUBLIC_KEY = "fake_public_key" # export TIDBCLOUD_PRIVATE_KEY = "fake_private_key" provider "tidbcloud" {   public_key  = "fake_public_key"   private_key = "fake_private_key" } 
  2. Integrate TiDB Cloud instances into the Bytebase change management process with the  Bytebase Terraform provider. For more details, see Manage Bytebase with Terraform.
    For example, the following code adds the specified TiDB Cloud instance into Bytebase:
    # Configure the Bytebase Provider
    terraform {
      required_providers {
        bytebase = {
          version = "0.0.7-alpha.3"
          # For local development, please use "terraform.local/bytebase/bytebase" instead
          source = ""
    provider "bytebase" {
      # You need to replace the account and key with your Bytebase service account.
      service_account = "your service account"
      service_key     = "your service key"
      # The Bytebase service URL. You can use the external URL in production.
      # Check the docs about external URL:
      url = "your bytebase console url"

Delivering the next-generation database development experience

With TiDB Cloud, developers can provision a serverless, distributed HTAP database in seconds. With Bytebase, application teams can have a single portal to manage the entire TiDB development lifecycle. 

Also, teams can use Terraform providers to adopt database-as-code and codify the entire database provisioning and preparation process.

To learn more about this partnership, check out our PingCAP Cloud & Technology Partner Program

Book a Demo

Want to explore TiDB without installing any software? Go to TiDB Playground

Spin up a Serverless database with 25GiB free resources.

Start Now

Have questions? Let us know how we can help.

Contact Us
TiDB Dedicated

TiDB Dedicated

A fully-managed cloud DBaaS for predictable workloads

TiDB Dedicated

TiDB Serverless

A fully-managed cloud DBaaS for auto-scaling workloads