Overview

TiDB is an open-source, cloud-native, distributed SQL database built by PingCAP. It provides:

  • MySQL compatibility: Seamlessly migrate from MySQL with minimal changes
  • Horizontal scalability: Scale out compute and storage independently
  • HTAP capabilities: Run transactional and analytical workloads on the same data
  • Strong consistency: ACID transactions with distributed architecture
  • High availability: Built-in fault tolerance with automatic failover

TiDB is designed to handle both OLTP and OLAP workloads, making it ideal for modern applications that require real-time analytics on operational data.

Connecting

To connect to TiDB in DBCode:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Complete connection form: Select TiDB as the database type and enter:
    • Host address (default port: 4000)
    • Authentication credentials (username/password)
    • Database name (optional)
    • SSL configuration (if required)
  4. Connect: Click save to connect to your TiDB database.
  5. Start Managing Your Database: Browse databases, tables, views, and stored procedures.

For detailed instructions on connecting to TiDB, refer to the Connect article.

TiDB Cloud

TiDB is available as a fully managed service through TiDB Cloud. To connect to TiDB Cloud:

  1. Create a cluster in TiDB Cloud console
  2. Get your connection credentials from the cluster details
  3. Use the provided host, port, and credentials in DBCode

TiDB Features in DBCode

DBCode enhances your TiDB development experience with:

  • Full MySQL compatibility: Use familiar MySQL syntax and tools
  • Schema exploration: Navigate databases, tables, views, and procedures
  • Query execution: Run queries with syntax highlighting and autocomplete
  • Data export/import: Transfer data between TiDB instances

By using TiDB with DBCode, you can efficiently develop, test, and manage your TiDB databases directly within Visual Studio Code.

For more information about TiDB, check out TiDB by PingCAP.