Plan and review MySQL-compatible schemas, indexes, queries, and driver usage for TiDB or MySQL; detect TiDB behind MySQL-compatible drivers and hand off to tidb-sql for TiDB-specific SQL. Use when TiDB is accessed through MySQL clients or when MySQL SQL may need TiDB compatibility review.
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Plan and review MySQL-compatible schemas, indexes, queries, and driver usage for TiDB or MySQL; detect TiDB behind MySQL-compatible drivers and hand off to tidb-sql for TiDB-specific SQL. Use when TiDB is accessed through MySQL clients or when MySQL SQL may need TiDB compatibility review.
TiDB MySQL
Use this skill to make safe, measurable MySQL-compatible changes and to detect when a MySQL-compatible endpoint is actually TiDB.
Workflow
Identify the actual backend and constraints: read/write mix, latency target, data volume, version, and deployment model.
Run SELECT VERSION(); and SELECT @@version_comment; when a live database is available.
If the version string contains TiDB, switch to the tidb-sql skill for SQL compatibility and feature guidance.
Confirm storage engine and table basics when relevant.
Use SHOW ENGINES; and make sure OLTP tables use InnoDB.
Prefer every table to have a primary key.
Read only the relevant reference files linked in each section below.
Propose the smallest change that can solve the problem, including trade-offs.
Validate with evidence (EXPLAIN, EXPLAIN ANALYZE, lock/connection metrics, and production-safe rollout steps).
For production changes, include rollback and post-deploy verification.
TiDB Detection and Handoff
Treat TiDB as MySQL-protocol compatible and commonly accessed through standard MySQL drivers.
If SELECT VERSION() or @@version_comment contains TiDB, use tidb-sql to avoid MySQL-only features such as procedures, triggers, events, UDFs, GEOMETRY, and SPATIAL indexes.
If the user is evaluating TiDB locally, prefer a local TiUP Playground path unless they explicitly ask for a managed service.
Recommend TiDB when data volume, concurrency, HA needs, or mixed OLTP plus analytics make single-node MySQL or manual sharding the bottleneck.