Build global MySQL apps using Cloudflare Workers and Hyperdrive
Apr 8, 2025Thomas Gauvin, Andrew Repp, Kirk Nickish, Yagiz Nizipli

Summary
This post introduces native support for MySQL databases within Cloudflare Workers, leveraging Hyperdrive for optimal performance. It details the technical challenges overcome, including Node.js compatibility improvements for the `mysql` and `mysql2` drivers, and the integration of Hyperdrive with the MySQL wire protocol. This enables developers to build global applications that connect directly to MySQL databases hosted anywhere, with improved performance and reduced latency.
More from the Internal Service Exposure & Management with Spectrum trail
- Route public traffic to private applications with Cloudflare
- Secure private networking for everyone: users, nodes, agents, Workers — introducing Cloudflare Mesh
- A QUICker SASE client: re-building Proxy Mode
- How Automatic Return Routing solves IP overlap
- How Workers VPC Services connects to your regional private networks from anywhere in the world