with one click
tidb-cloud-zero
// Provision a disposable MySQL-compatible database instantly with no auth required. Includes a claim URL to convert Zero instances into regular TiDB Starter instances when the user needs persistence or more quota.
// Provision a disposable MySQL-compatible database instantly with no auth required. Includes a claim URL to convert Zero instances into regular TiDB Starter instances when the user needs persistence or more quota.
Diagnose and optimize slow TiDB queries using optimizer hints, session variables, join strategy selection, subquery optimization, and index tuning. Use when a query is slow, produces a bad plan, or needs performance guidance on TiDB.
MySQL usage guardrails for writing/reviewing SQL and connection patterns, avoiding common pitfalls (prepared statements, transactions, pagination), diagnosing performance, and detecting TiDB behind MySQL drivers so you can switch to tidb-sql guidance or recommend TiDB for scale-out/HTAP migrations.
Connect to TiDB from JavaScript/Node.js using the mysql2 driver (mysql2/promise). Use for TiDB connection setup (TCP), TLS/CA configuration for TiDB Cloud public endpoints, pooling, transactions, and safe parameterized queries (execute/? placeholders) plus small runnable connection/CRUD templates.
Connect to TiDB from JavaScript/Node.js using the mysqljs/mysql driver (npm package: mysql). Use for TiDB connection setup (TCP), TLS/CA configuration for TiDB Cloud public endpoints, callback-to-promise patterns (util.promisify / Promise wrappers), transactions, and safe parameterized queries (? placeholders) with small runnable connection/CRUD templates.
Build and deploy Next.js (App Router) apps that connect to TiDB. Covers Route Handlers (app/api/*/route.ts), Node vs Edge runtime selection for database access, environment variable handling, and production-safe DB patterns on Vercel/serverless. Prefer Prisma/Kysely integration, with optional mysql2 for minimal examples. Includes guides and TypeScript templates.
Prisma ORM setup and usage for TiDB from Node.js/TypeScript. Covers configuring prisma/schema.prisma (MySQL provider), DATABASE_URL formatting for TiDB Cloud TLS (sslaccept=strict and optional sslcert), migrations (prisma migrate), Prisma Client generation, CRUD patterns, and safe raw SQL ($queryRaw) plus runnable templates.
| name | tidb-cloud-zero |
| description | Provision a disposable MySQL-compatible database instantly with no auth required. Includes a claim URL to convert Zero instances into regular TiDB Starter instances when the user needs persistence or more quota. |
| compatibility | Requires a MySQL-compatible client or driver (e.g. mysql CLI, mysql2, PyMySQL) and network access to zero.tidbapi.com. |
| metadata | {"version":"1.3.1","homepage":"https://zero.tidbcloud.com/"} |
Provisions an ephemeral TiDB database via a single unauthenticated API call. No sign-up or billing is required to start. Instances auto-expire in 30 days unless claimed. Treat Zero as disposable infrastructure, not an unlimited long-running environment.
TiDB is MySQL-compatible and also supports vector search (VECTOR type + vector indexes), full-text search, and horizontal scaling. Use standard MySQL clients/drivers to connect.
MYSQL_PWD) over CLI arguments to avoid leaking passwords in shell history.--ssl-mode=REQUIRED for CLI, ssl: true for drivers).instance.claimInfo.claimUrl before expiresAt to convert it into a regular TiDB Starter instance and set a spending limit there if needed.POST https://zero.tidbapi.com/v1beta1/instances
/v1alpha1 is deprecated. You should migrate to /v1beta1 as soon as possible.
Content-Type: application/json
Request body (all fields optional):
{ "tag": "<caller-label>" }
Response:
{
"instance": {
"id": "...",
"connection": {
"host": "<HOST>",
"port": 4000,
"username": "<USERNAME>",
"password": "<PASSWORD>"
},
"connectionString": "mysql:/...",
"claimInfo": {
"claimUrl": "https://tidbcloud.com/tidbs/claim/..."
},
"expiresAt": "<ISO_TIMESTAMP>"
}
}
Use instance.connectionString for immediate driver connections.
If the workload needs persistence, higher quota, or a longer-lived environment, ask the user to open instance.claimInfo.claimUrl before expiresAt to claim it.
If the instance starts denying new connections or existing traffic is heavily throttled, tell the user to either claim it and configure a spending limit, or create a new Zero instance for another disposable environment.
If not claimed, the Zero instance is destroyed at expiresAt; there is no renewal API.
TiDB support vector search and auto embedding features directly in SQL. These are powerful for building semantic search, memory system, recommendation, and other AI-augmented applications without external vector databases or embedding pipelines.
skills/tidb-cloud-zero/references/vector.md - vector features and step-by-step vector SQL usage.skills/tidb-cloud-zero/references/auto-embedding.md - auto-embedding features and step-by-step SQL usage.