Connecting to TiDB Cloud
- Open the connections page in preferences, see managing connections for more information.
- Click the
Add new connection
button at the top of the connections page.
- Select
MySQL
from the list (TiDB uses the MySQL driver).
- Give a
Connection name
for your own internal reference. - For
Hostname
, enter the hostname of your database server. - For
Port
, use the default4000
, or enter the port used by your server. - For
Database
, enter the name of your database. - For
Username
andPassword
, enter the username and password from PlanetScale. These are optional. - Toggle connection type for direct or cloud.
- Share the connection with your team.
- Enable
SSL
. TiDB requires SSL, but you can leave the certificates blank to use the default Debian OS certificate.
Note: TiDB is an open-source MySQL-Compatible HTAP distributed database that has 3 deployments:- TiDB Self-Hosted: Self-managed TiDB clusters run on users' environments.
- TiDB Dedicated: It's a TiDB Cloud deployment following the traditional database vendors. It's fixed specs.
- TiDB Serverless: Another TiDB Cloud deployment. By name, it's serverless, charge by usage, scale infinitely.
When connecting, TiDB Self-Hosted and TiDB Dedicated use a self-signed certificate and users should upload the Root Certificate to PopSQL to connect. TiDB Serverless uses Let's Encrypt CA so usually there is no need to upload the Root Certificate.
- (Optional) Configure
SSH
settings. - Hit
Connect
and you're all set!
Happy querying! 🍭
Updated about 1 year ago