PlanetScale → Neon
mediumPlanetScale removed its free tier in 2024. Neon offers serverless PostgreSQL with scale-to-zero and database branching. Switching MySQL → PostgreSQL requires schema and query changes.
Sign up at neon.tech, create a project. Note your connection string.
Use mysqldump to export your schema and data.
mysqldump -h $PS_HOST -u $PS_USER -p$PS_PASS --no-tablespaces $DB_NAME > dump.sql
MySQL and PostgreSQL have differences: AUTO_INCREMENT → SERIAL or GENERATED, tinyint(1) → boolean, backtick identifiers → double-quote. Use pgloader for automatic conversion.
pgloader mysql://$PS_CONNECTION_STRING postgresql://$NEON_CONNECTION_STRING
MySQL-specific SQL: LIMIT x,y → LIMIT y OFFSET x, IFNULL → COALESCE, GROUP BY rules are stricter in PostgreSQL.
If using Prisma: change datasource provider from 'mysql' to 'postgresql'. If Drizzle: switch to drizzle-orm/neon-http.
npm install @neondatabase/serverless
Use Neon branches for dev/staging environments — mirrors PlanetScale's branching workflow.
What this migration involves
Moving from PlanetScale to Neon is rated medium and takes about 4-10h on a typical project. The guide breaks it into 6 steps, 3 of which ship with runnable commands and 1 with a verification check. On pricing, PlanetScale is freemium and Neon is freemium with a free plan to test the move.
Related migrations
FAQ
How long does migrating from PlanetScale to Neon take?
Around 4-10h for a typical project — 6 steps, difficulty rated medium, 3 of them with copy-paste commands.
Is moving from PlanetScale to Neon reversible?
No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your PlanetScale data before you start.
What does Neon cost compared to PlanetScale?
PlanetScale: freemium from $29/mo, free plan available. Neon: freemium from $19/mo, free plan available.