- A PlanetScale database — If you haven’t created a database, refer to our PlanetScale quickstart guide to get started
- A Vercel account
- A project deployed to Vercel — If you’re just poking around and don’t already have an application to deploy, you can use our Next.js + PlanetScale sample
Get your connection string from PlanetScale
In your PlanetScale dashboard, click on the database you want to connect to.
Select the framework you’re using from the “Select your language or framework” section. This will give you the exact environment variable names you need for your selected framework. If your framework is not listed, choose “Other”.

Copy environment variables to Vercel
For example, if you’re using Prisma, your connection string will look similar to this:
- NAME =
DATABASE_URL - VALUE =
mysql://xxxxxxxxx:************@xxxxxxxxxx.us-east-3.psdb.cloud/my_database?sslaccept=strict
The credentials are blurred for the example, but when you paste them in, use the actual values.


