cloudflare · Cloudflare Workers Docs
Workers PlanetScale
Connect Cloudflare Workers to a PlanetScale MySQL database using either Hyperdrive for connection pooling or the PlanetScale serverless driver.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers PlanetScale
Connect Cloudflare Workers to a PlanetScale MySQL database using either Hyperdrive for connection pooling or the PlanetScale serverless driver.
When To Use
Use when you need to connect a Cloudflare Worker to a PlanetScale database while optimizing for latency and connection pooling via Hyperdrive.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-databases-third-party-integrations-planetscale-workflow-guide.md | A guide explaining how to connect Cloudflare Workers to PlanetScale databases using Hyperdrive. | Questions about a guide explaining how to connect Cloudflare Workers to PlanetScale databases using Hyperdrive. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker.text | A configuration object demonstrating how to specify region placement for a PlanetScale database connection within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A configuration object demonstrating how to specify region placement for a PlanetScale database connection within a C... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-2.text | A text file containing the MySQL connection string format required to connect Cloudflare Workers to a PlanetScale database. | Exact payloads, commands, or snippets shown in A text file containing the MySQL connection string format required to connect Cloudflare Workers to a PlanetScale dat... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-3.text | A CLI command example using wrangler to create a Hyperdrive configuration for a PlanetScale database connection. | Exact payloads, commands, or snippets shown in A CLI command example using wrangler to create a Hyperdrive configuration for a PlanetScale database connection. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-4.text | A wrangler.toml configuration file demonstrating how to set up a Cloudflare Worker with a PlanetScale database integration. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating how to set up a Cloudflare Worker with a PlanetScale database integr... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-5.text | A wrangler.toml configuration file demonstrating the setup for a Cloudflare Worker integrating with PlanetScale. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating the setup for a Cloudflare Worker integrating with PlanetScale. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-6.text | The npm installation command required to add the mysql2 driver to a Cloudflare Workers project for PlanetScale integration. | Exact payloads, commands, or snippets shown in The npm installation command required to add the mysql2 driver to a Cloudflare Workers project for PlanetScale integr... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-7.text | The shell command to install the mysql2 package required for connecting Cloudflare Workers to PlanetScale. | Exact payloads, commands, or snippets shown in The shell command to install the mysql2 package required for connecting Cloudflare Workers to PlanetScale. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-8.text | The shell command to install the mysql2 package required for connecting Cloudflare Workers to PlanetScale. | Exact payloads, commands, or snippets shown in The shell command to install the mysql2 package required for connecting Cloudflare Workers to PlanetScale. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-9.text | The shell command to install the mysql2 package using bun for a Cloudflare Workers PlanetScale integration. | Exact payloads, commands, or snippets shown in The shell command to install the mysql2 package using bun for a Cloudflare Workers PlanetScale integration. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-10.text | A wrangler.toml configuration file demonstrating compatibility flags and Hyperdrive bindings for connecting Cloudflare Workers to PlanetScale. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating compatibility flags and Hyperdrive bindings for connecting Cloudflar... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-11.text | A wrangler.toml configuration file demonstrating nodejs_compat flags, compatibility dates, and hyperdrive bindings for a PlanetScale integration. | Exact payloads, commands, or snippets shown in A wrangler.toml configuration file demonstrating nodejscompat flags, compatibility dates, and hyperdrive bindings for... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-12.text | A JavaScript code example demonstrating how to connect a Cloudflare Worker to a PlanetScale database using the mysql2 library and Hyperdrive. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to connect a Cloudflare Worker to a PlanetScale database using the mysql2... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-13.text | A SQL schema definition for creating a products table to be used with PlanetScale via Cloudflare Workers. | Exact payloads, commands, or snippets shown in A SQL schema definition for creating a products table to be used with PlanetScale via Cloudflare Workers. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-14.text | A text snippet demonstrating a SQL INSERT statement for adding products to a PlanetScale database via Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text snippet demonstrating a SQL INSERT statement for adding products to a PlanetScale database via Cloudflare Work... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-15.text | Wrangler CLI commands for setting PlanetScale database host, username, and password as environment secrets in Cloudflare Workers. | Exact payloads, commands, or snippets shown in Wrangler CLI commands for setting PlanetScale database host, username, and password as environment secrets in Cloudfl... |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-16.text | The npm installation command for the @planetscale/database package used within Cloudflare Workers. | Exact payloads, commands, or snippets shown in The npm installation command for the @planetscale/database package used within Cloudflare Workers. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-17.text | The yarn command required to add the @planetscale/database package to a Cloudflare Workers project. | Exact payloads, commands, or snippets shown in The yarn command required to add the @planetscale/database package to a Cloudflare Workers project. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-18.text | The pnpm command required to add the @planetscale/database package to a Cloudflare Workers project. | Exact payloads, commands, or snippets shown in The pnpm command required to add the @planetscale/database package to a Cloudflare Workers project. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-19.text | The shell command to install the PlanetScale database driver using the Bun package manager for Cloudflare Workers. | Exact payloads, commands, or snippets shown in The shell command to install the PlanetScale database driver using the Bun package manager for Cloudflare Workers. |
examples/workers-databases-third-party-integrations-planetscale-cloudflare-worker-20.text | A JavaScript code example demonstrating how to connect to a PlanetScale database from a Cloudflare Worker using the @planetscale/database driver. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to connect to a PlanetScale database from a Cloudflare Worker using the @... |
What This Skill Covers
- PlanetScale ↗ is a database platform that provides MySQL-compatible and PostgreSQL databases, making them more scalable, easier and safer to manage.
- Main sections:
1\. Allow Hyperdrive access,PlanetScale Dashboard,2\. Create a database configuration,3\. Use Hyperdrive from your Worker,Next steps.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/databases/third-party-integrations/planetscale
