Documentation
MySQL
PlanetScale

PlanetScale

According to their official website (opens in a new tab), PlanetScale is the world's most advanced serverless MySQL platform

With Drizzle ORM you can access PlanetScale over http through their official database-js (opens in a new tab) 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.

npm i drizzle-orm @planetscale/database
npm i -D drizzle-kit
index.ts
import { drizzle } from "drizzle-orm/planetscale-serverless";
import { connect } from "@planetscale/database";
 
// create the connection
const connection = connect({
  host: process.env["DATABASE_HOST"],
  username: process.env["DATABASE_USERNAME"],
  password: process.env["DATABASE_PASSWORD"],
});
 
const db = drizzle(connection);

Make sure to checkout PlanetScale official MySQL courses (opens in a new tab), we think they're outstanding 🙌