PlanetScale databases now plug straight into Workers
Cloudflare Workers can now connect directly to PlanetScale databases, giving developers a path to full-stack applications on Postgres or MySQL without leaving the Cloudflare dashboard. The integration pairs PlanetScale with Hyperdrive, Cloudflare’s distributed connection pooler and query cache, so database connections are automatically tuned for low latency from Workers.
PlanetScale was chosen as a partner because it meets the same bar Cloudflare holds for performance, reliability, and developer experience — requirements that matter when teams are building serious applications. With the new integration, linking a Cloudflare account to a PlanetScale account eliminates the usual copy-paste shuffle of API keys and credentials. From either dashboard, developers can attach any PlanetScale database — production instances included — to a Workers application.

Why Postgres and MySQL on Workers
Workers has grown from an edge compute platform into a full-stack environment with a range of data options: Workers KV for unstructured edge storage, D1 and Durable Objects for multi-tenant apps with isolated SQL databases, and Hyperdrive for fast, scalable access to external databases. Adding PlanetScale expands that toolbox with two of the most widely used database engines in the industry.
Postgres and MySQL remain popular because large organizations have spent years building and scaling on them, producing mature ecosystems and battle-tested tooling. The partnership gives Workers developers access to that established infrastructure while keeping the operational experience inside Cloudflare's dashboard. Under the hood, Hyperdrive handles the heavy lifting: it keeps connections warm so requests don't pay new-connection latency costs, pools connections to reduce CPU load on the database, and can cache results for hot, read-heavy queries. Since roughly 80% of queries on a typical transactional database are read-only, that cache can make a substantial difference.

Credentials handled, connections optimized
Connecting a PlanetScale database from the Cloudflare dashboard now takes only a few clicks. The setup is secure by default — a one-click password rotation option means developers never have to manually manage or copy credentials between platforms. The integration creates a Hyperdrive configuration tuned for the PlanetScale database automatically.
The experience is symmetric: developers can also view and create attached Hyperdrive configurations for their databases from the PlanetScale dashboard. That means a developer can manage database connectivity from whichever side of the stack they happen to be working in.

When a Worker connects through the Hyperdrive configuration, the connection setup happens within the Hyperdrive client itself, letting queries ride existing pooled connections instead of performing new roundtrips. Hyperdrive’s Placement system determines where the database lives and places its connection pool in Cloudflare data centers that minimize latency. The result is that Workers get the fastest practical path to PlanetScale data, with the option to cache query results for workloads that need to scale on reads. The same Hyperdrive configuration can be reused across multiple Workers applications and environments without reconfiguring credentials.
Getting started
To connect PlanetScale to Workers, start from either direction:
- Go to the Cloudflare dashboard and connect a PlanetScale account
- Or go to PlanetScale and connect a Cloudflare account
- Then deploy a Worker that uses the new Hyperdrive configuration
For deeper details, the Hyperdrive docs and the PlanetScale docs cover the connection flow from both platforms.




