This document shows how to get started using PlanetScale CNDb. By the end, you will have a working PlanetScale CNDb that you can connect to using MySQL Workbench.
Before beginning this tutorial, you must install MySQL Workbench.
This quickstart includes the following steps:
If you do not have a PlanetScale account, create one first.
Go to console.planetscale.com and click Sign up here. Provide user account information. Payment information is not necessary for this quickstart.
After creating an account, the Clusters screen appears. Click Create Cluster. Each cluster runs one or more databases.
In the Create New Cluster pane, specify the name for your cluster and the cloud provider and region where you want the cluster to run.
After creating a cluster, the Overview for your new cluster appears.
Click Create Database. In the Create New Database pane, specify the name for your database and the region where you want the database to run.
On the Configure screen, click Create Database. You do not need to change any of the default configuration options.
After creating a database, the Overview for your new database appears. The current deployment status of your database appears in the Status pane. Your new database takes several minutes to deploy. When the status is "Deployed," you can connect to your new database.
To find the MySQL connection string for your database, click the Connect button in the upper-right of the Overview screen.
This displays the MySQL connection string for your database. This string contains the hostname, port number, user name, and password for your database. Click Copy to copy this string to your clipboard.
Open MySQL Workbench and click New Connection. In the "Set up a New Connection" dialog box, enter the connection credentials contained in your connection string.
The connection string is formatted as follows:
--host [hostname] --port [port number] --user [username] --password=[password]
Click Okay. Your database should now appear as a connection in MySQL Workbench, and the SQL Query Tab for your database should open.
In the SQL Query Tab for your database, enter the following query:
This query returns the following output: