create
Create a new Hyperdrive configuration.The name of the Hyperdrive configuration
Connection String Options
The connection string for the database you want Hyperdrive to connect to.
Format:
protocol://user:password@host:port/databaseSupported protocols: postgres, postgresql, mysqlIndividual Parameter Options
Alternatively, configure the connection using individual parameters (conflicts with--connection-string):
The host of the origin database (alias:
--host)The port number of the origin database (alias:
--port)The scheme used to connect to the origin database (alias:
--scheme)Valid values: postgres, postgresql, mysqlThe name of the database within the origin database
The username used to connect to the origin database (alias:
--user)The password used to connect to the origin database (alias:
--password)Hyperdrive over Access Options
The Client ID of the Access token to use when connecting to the origin database.Requires
--access-client-secret. Conflicts with --origin-port.The Client Secret of the Access token to use when connecting to the origin database
Caching Options
Disables the caching of SQL responses
Specifies max duration for which items should persist in the cache. Cannot be set when caching is disabled
Indicates the number of seconds cache may serve the response after it becomes stale. Cannot be set when caching is disabled
Security Options
Sets custom CA certificate when connecting to origin database. Must be valid UUID of already uploaded CA certificate (alias:
--ca-certificate-uuid)Sets custom mTLS client certificates when connecting to origin database. Must be valid UUID of already uploaded public/private key certificates (alias:
--mtls-certificate-uuid)Sets CA sslmode for connecting to database.Valid values:
require, verify-ca, verify-fullPerformance Options
The (soft) maximum number of connections that Hyperdrive may establish to the origin database
Worker Binding Options
The binding name of this resource in your Worker
Automatically update your config file with the newly added resource
Examples
Using a connection string
Using individual parameters
With caching options
With SSL/TLS options
delete
Delete a Hyperdrive configuration.The ID of the Hyperdrive configuration to delete
Example
list
List all Hyperdrive configurations.Example
- Configuration ID
- Configuration name
- Database user
- Host
- Port
- Database scheme (PostgreSQL/MySQL)
- Database name
- Caching settings
- mTLS configuration
- Origin connection limit
get
Get details about a specific Hyperdrive configuration.The ID of the Hyperdrive configuration
Example
update
Update an existing Hyperdrive configuration.The ID of the Hyperdrive configuration to update
Options
All options from thecreate command are supported, plus:
Give your configuration a new name
Examples
Update connection credentials
Update caching settings
Disable caching
Configuration
After creating a Hyperdrive configuration, add it to your Worker:wrangler.json
SSL/TLS Configuration
Hyperdrive supports three SSL modes for PostgreSQL:require
Requires an SSL connection but does not verify the server certificate.verify-ca
Requires an SSL connection and verifies that the server certificate is issued by a trusted CA.When using
verify-ca or verify-full, you must provide a CA certificate ID.verify-full
Requires an SSL connection, verifies the CA, and verifies that the server hostname matches the certificate.Mutual TLS (mTLS)
For databases requiring client certificate authentication:Database Support
Hyperdrive supports:- PostgreSQL and PostgreSQL-compatible databases (e.g., CockroachDB, Neon, Supabase)
- MySQL and MySQL-compatible databases (e.g., PlanetScale, Vitess)
- PostgreSQL: 5432
- MySQL: 3306