Drizzle <> PlanetScale
This guide assumes familiarity with:
- Database connection basics with Drizzle
- PlanetScale database - website
- PlanetScale http driver - GitHub
- Drizzle MySQL drivers - docs
According to the official website, PlanetScale is the world’s most advanced serverless MySQL platform.
With Drizzle ORM you can access PlanetScale over http
through their official database-js
driver from serverless and serverfull environments with our drizzle-orm/planetscale-serverless
package.
You can also access PlanetScale through TCP with mysql2
driver — see here.
Step 1 - Install packages
npm
yarn
pnpm
bun
Step 2 - Initialize the driver and make a query
If you need to provide your existing driver
Make sure to checkout the PlanetScale official MySQL courses, we think they’re outstanding 🙌