This document explains how to link an external database to your PlanetScaleDB account.
You must have the following details for your external database:
Linking an external database to your PlanetScaleDB account allows you to test how PlanetScaleDB will behave with your database. PlanetScaleDB will create a database in your cluster, called a database link, that sends its queries to your external database. This allows you to test the compatibility of your database with PlanetScaleDB.
To link an external database, 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 PlanetScaleDB will create your database link. This will open the overview for the cluster.
Under Create your first link, click the Link Database button.
This opens the Link External Database pane.
In the Link External Database pane, enter the details for your external database.
PlanetScaleDB will attempt to connect to your external database from the default cloud provider and region for your cluster. If the connection fails, follow Step 7 below.
Select a region from the Region Deployment card. You can choose from the regions and cloud providers that this cluster supports. This is the region where the PlanetScaleDB components for your linked database reside.
This step is only necessary if your external database does not accept connections from external IP addressesby default.
A list of IP addresses appears at the bottom of the Region Deployment section. Add these IP addresses to the IP access list for your external database.
Under Link Name, provide a name for this database link.
PlanetScaleDB connects to your external database. Your linked database will appear under Links in the Clusters overview.