TiDB

TiDB is its own database type in QueryDesk. It speaks the MySQL protocol, so the schema sync, the table structure view, data protection and peer reviews work as they do on MySQL. QueryDesk is tested against TiDB 8.5.

Connect a cluster

Add the database as in Connect a database, with these values:

FieldValue
Database typeTiDB
Port4000, TiDB's default.
Database nameThe database to query, for example test.

TiDB Cloud

The cluster's Connect dialog in the TiDB Cloud console gives a mysql:// connection string. Choose TiDB as the database type first, then paste the string under Update with connection string on the database's settings page and click Apply. The database keeps the TiDB type. TiDB Cloud requires TLS, so turn on Encryption if the string didn't. Its user names have a prefix, such as 2abc.root; enter the whole name.

Click Test Connection under the credential to check the connection.

What works differently

  • AI read-only runs an AI query in a read-only stale-read transaction one second in the past (AS OF TIMESTAMP NOW(6) - INTERVAL 1 SECOND), which is always rolled back, so it doesn't see writes from the last second. TiDB refuses a plain read-only transaction, and refuses any write in a stale-read one.
  • TiDB-only syntax that the MySQL parser doesn't read, such as BATCH ... DELETE, SPLIT TABLE or AS OF TIMESTAMP in a query, is read as a write, and data protection refuses it. So does a SHOW that prints column values, such as SHOW TABLE ... REGIONS or SHOW STATS_TOPN.

Was this page helpful?