This document explains how to create a database using the PlanetScale console.
Before you can create a database, you must first create a cluster.
To create a database, you will complete the following steps:
When you create a new cluster, this page opens automatically. Otherwise, log in to the PlanetScale console.
Click on the name of the cluster where your database will run. This will open the overview for the cluster.
In the cluster overview, click the Create Database button.
This opens the Create New Database pane.
In the Create New Database pane, enter the name of your new database.
Database names can only contain lowercase alphanumeric characters.
By default, PlanetScale deploys your database immediately on creation. If you deselect this option, you have the option to deploy the database from the database Overview later.
In the Create New Database pane, select a region from the Regions dropdown. You can choose from the regions that you selected for the cluster where this database will run.
Under Instance Configuration, select the amount of CPU, RAM, and storage for each instance.
The Cost per instance calculator below shows the hourly cost for the current instance configuration.
The Cost per shard calculator below shows the hourly cost for the current number of instances per shard.
Note: PlanetScale does not recommend databases with fewer than three replicas per shard for production environments, because they may not survive a partial region outage and are subject to downtimes of up to 30 seconds during scheduled maintenance procedures.
Under Sharding, choose Unsharded or Sharded. For a sharded database, select the number of shards.
The Total cost calculator below shows the overall hourly cost of your database. Because each shard contains the selected number of instances, the total cost of the database is the number of shards multiplied times the number of instances.
By default, your database deploys immediately. This process can take up to several minutes.
Once your database is ready, the Cluster Overview displays its status as Deployed.
This opens the Database Overview for your new database.
If you deselected Deploy on creation in Step 4 above, you can deploy it at any time from the Database Overview.