Tools: Ultimate Guide: PlanetScale Has a Free-Like Experience — Serverless MySQL With Branching, Zero-Downtime Migrations, and Vitess Under the Hood

Tools: Ultimate Guide: PlanetScale Has a Free-Like Experience — Serverless MySQL With Branching, Zero-Downtime Migrations, and Vitess Under the Hood

What Makes PlanetScale Different

Quick Start

1. Create a Database

2. Connect with Node.js (Serverless Driver)

3. Connect with Python

4. Schema Branching (The Killer Feature)

Real-World Use Case

Pricing

The Bottom Line

More Free APIs You Should Know About MySQL is 30 years old and still powers most of the web. But managing MySQL in production — schema migrations, replication, scaling — is a full-time job. PlanetScale takes MySQL and adds what it always needed: git-like branching for schemas, zero-downtime migrations, and serverless scaling. Built on Vitess, the same technology that powers YouTube. Their Scaler plan starts at $39/month with generous usage, and they offer a Hobby tier for development. Sign up at planetscale.com, create a database, grab your connection string. No connection pooling needed. Works in Vercel Edge Functions, Cloudflare Workers, Deno Deploy. This is the workflow every database should have had decades ago. A SaaS developer told me: "We had 3 hours of downtime last year from a MySQL ALTER TABLE on a 50M row table. With PlanetScale, the same migration took 0 seconds of downtime. The deploy request showed us exactly what would change before we merged." If you are running MySQL in production and doing migrations with fear and downtime — PlanetScale is what MySQL should have been from the start. Schema branching alone is worth the switch. Zero-downtime migrations make it a no-brainer. Need to scrape data and load it into your database? Check out my web scraping tools on Apify — extract structured data from any website and export as CSV/JSON for easy import. Building something custom? Email me at [email protected] Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

$ -weight: 500;">npm -weight: 500;">install @planetscale/database -weight: 500;">npm -weight: 500;">install @planetscale/database -weight: 500;">npm -weight: 500;">install @planetscale/database import { connect } from "@planetscale/database"; const conn = connect({ host: "aws.connect.psdb.cloud", username: "YOUR_USERNAME", password: "YOUR_PASSWORD", }); // Query const results = await conn.execute("SELECT * FROM users WHERE email = ?", [ "[email protected]", ]); console.log(results.rows); // Insert await conn.execute( "INSERT INTO users (name, email) VALUES (?, ?)", ["Alex", "[email protected]"] ); import { connect } from "@planetscale/database"; const conn = connect({ host: "aws.connect.psdb.cloud", username: "YOUR_USERNAME", password: "YOUR_PASSWORD", }); // Query const results = await conn.execute("SELECT * FROM users WHERE email = ?", [ "[email protected]", ]); console.log(results.rows); // Insert await conn.execute( "INSERT INTO users (name, email) VALUES (?, ?)", ["Alex", "[email protected]"] ); import { connect } from "@planetscale/database"; const conn = connect({ host: "aws.connect.psdb.cloud", username: "YOUR_USERNAME", password: "YOUR_PASSWORD", }); // Query const results = await conn.execute("SELECT * FROM users WHERE email = ?", [ "[email protected]", ]); console.log(results.rows); // Insert await conn.execute( "INSERT INTO users (name, email) VALUES (?, ?)", ["Alex", "[email protected]"] ); import mysql.connector conn = mysql.connector.connect( host="aws.connect.psdb.cloud", user="YOUR_USERNAME", password="YOUR_PASSWORD", database="mydb", ssl_ca="/etc/ssl/cert.pem" ) cursor = conn.cursor(dictionary=True) cursor.execute("SELECT * FROM users WHERE email = %s", ("[email protected]",)) users = cursor.fetchall() print(users) import mysql.connector conn = mysql.connector.connect( host="aws.connect.psdb.cloud", user="YOUR_USERNAME", password="YOUR_PASSWORD", database="mydb", ssl_ca="/etc/ssl/cert.pem" ) cursor = conn.cursor(dictionary=True) cursor.execute("SELECT * FROM users WHERE email = %s", ("[email protected]",)) users = cursor.fetchall() print(users) import mysql.connector conn = mysql.connector.connect( host="aws.connect.psdb.cloud", user="YOUR_USERNAME", password="YOUR_PASSWORD", database="mydb", ssl_ca="/etc/ssl/cert.pem" ) cursor = conn.cursor(dictionary=True) cursor.execute("SELECT * FROM users WHERE email = %s", ("[email protected]",)) users = cursor.fetchall() print(users) # Install CLI -weight: 500;">brew -weight: 500;">install planetscale/tap/pscale # Create a branch pscale branch create mydb add-orders-table # Switch to branch and modify schema safely pscale shell mydb add-orders-table > CREATE TABLE orders ( > id BIGINT AUTO_INCREMENT PRIMARY KEY, > user_id BIGINT NOT NULL, > amount DECIMAL(10,2), > created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP > ); # Create a deploy request (like a PR for your schema) pscale deploy-request create mydb add-orders-table # Deploy — zero downtime, no locks pscale deploy-request deploy mydb 1 # Install CLI -weight: 500;">brew -weight: 500;">install planetscale/tap/pscale # Create a branch pscale branch create mydb add-orders-table # Switch to branch and modify schema safely pscale shell mydb add-orders-table > CREATE TABLE orders ( > id BIGINT AUTO_INCREMENT PRIMARY KEY, > user_id BIGINT NOT NULL, > amount DECIMAL(10,2), > created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP > ); # Create a deploy request (like a PR for your schema) pscale deploy-request create mydb add-orders-table # Deploy — zero downtime, no locks pscale deploy-request deploy mydb 1 # Install CLI -weight: 500;">brew -weight: 500;">install planetscale/tap/pscale # Create a branch pscale branch create mydb add-orders-table # Switch to branch and modify schema safely pscale shell mydb add-orders-table > CREATE TABLE orders ( > id BIGINT AUTO_INCREMENT PRIMARY KEY, > user_id BIGINT NOT NULL, > amount DECIMAL(10,2), > created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP > ); # Create a deploy request (like a PR for your schema) pscale deploy-request create mydb add-orders-table # Deploy — zero downtime, no locks pscale deploy-request deploy mydb 1 - Schema branching — create a branch, modify schema, merge when ready - Zero-downtime migrations — deploy schema changes without locking tables - Built on Vitess — horizontal sharding that scales to billions of rows - Serverless driver — connect from edge/serverless without connection pooling - MySQL compatible — works with any MySQL client, ORM, or tool - Insights — query analytics and performance monitoring built in - 30+ Free APIs Every Developer Should Bookmark - Algolia Has a Free Tier - MongoDB Atlas Has a Free Tier - Auth0 Has a Free Tier - Cloudinary Has a Free API - OpenAI Has a Free API Tier - Firebase Has a Free Tier - Supabase Has a Free Tier - Stripe Has a Free API - Vercel Has a Free Tier - Telegram Has a Free Bot API - Resend Has a Free API - Upstash Has a Free API - Neon Has a Free API