PlanetScale on a plane ✈️

Drew Bredvick, building-productsplanetscalenext.jsprisma
Back

If you're using Prisma + PlanetScale, the airplane WiFi (or any slow WiFi, really) might cause some issues for you.

You might be seeing an error message like this:

Invalid prisma.user.findUnique() invocation: Can't reach database server at 127.0.0.1:3306 Please make sure your database server is running at 127.0.0.1:3306.

Edit your connection string like this, and you should be good to go:

DATABASE_URL=mysql://127.0.0.1:3306/<your-db-name>?pool_timeout=0&connect_timeout=30

The default Prisma timeouts are around 10 seconds. Changing these two should get you up and running.

Have a safe flight 👋

Subscribe to 3-2-1 Tech

Get weekly emails from me with 3 tips for your side projects, 2 web dev articles, and 1 project update.

Read the latest issue
© Drew Bredvick.RSS