You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This implies that a single Worker invocation may obtain multiple connections to perform its database operations and may need to `SET` any configurations for every query or transaction. It is not recommended to wrap multiple database operations with a single transaction to maintain the `SET` state. Doing so will affect the performance and scaling of Hyperdrive as the connection cannot be reused by other Worker isolates for the duration of the transaction.
60
60
61
-
Hyperdrive supports named prepared statements as implemented in the `postgres.js` and `node-postgres` drivers. Named prepared statements in other drivers may have worse performance.
61
+
Hyperdrive supports named prepared statements as implemented in the `postgres.js` and `node-postgres` drivers. Named prepared statements in other drivers may have worse performance or may not be supported.
Copy file name to clipboardExpand all lines: src/content/docs/hyperdrive/examples/connect-to-mysql/aws-rds-aurora.mdx
+16-19Lines changed: 16 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
2
type: example
3
-
summary: Connect Hyperdrive to an AWS RDS or Aurora database instance.
3
+
summary: Connect Hyperdrive to an AWS RDS database instance.
4
4
pcx_content_type: example
5
-
title: AWS RDS and Aurora
5
+
title: AWS
6
6
sidebar:
7
7
order: 14
8
-
description: Connect Hyperdrive to an AWS RDS or Aurora database instance.
8
+
description: Connect Hyperdrive to an AWS RDS database instance.
9
9
---
10
10
11
11
import { Render } from"~/components";
12
12
13
-
This example shows you how to connect Hyperdrive to an Amazon Relational Database Service (Amazon RDS) Postgres or Amazon Aurora database instance.
13
+
This example shows you how to connect Hyperdrive to an Amazon Relational Database Service (Amazon RDS) MySQL database instance.
14
14
15
15
## 1. Allow Hyperdrive access
16
16
@@ -22,29 +22,20 @@ To allow Hyperdrive to connect to your database, you will need to ensure that Hy
22
22
23
23
When creating or modifying an instance in the AWS console:
24
24
25
-
1. Configure a **DB cluster identifier** and other settings you wish to customize.
26
-
2. Under **Settings** > **Credential settings**, note down the **Master username** and **Master password** (Aurora only).
27
-
3. Under the **Connectivity** header, ensure **Public access** is set to **Yes**.
28
-
4. Select an **Existing VPC security group** that allows public Internet access from `0.0.0.0/0` to the port your database instance is configured to listen on (default: `5432` for PostgreSQL instances).
29
-
5. Select **Create database**.
25
+
1. Configure a **database cluster** and other settings you wish to customize.
26
+
2. Under the **Connectivity** header, ensure **Public access** is set to **Yes**.
27
+
3. Select an **Existing VPC security group** that allows public Internet access from `0.0.0.0/0` to the port your database instance is configured to listen on (default: `5432` for PostgreSQL instances).
28
+
4. Select **Create database**.
30
29
31
30
:::caution
32
31
33
32
You must ensure that the [VPC security group](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html) associated with your database allows public IPv4 access to your database port.
34
33
35
-
Refer to AWS' [database server rules](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html#sg-rules-db-server) for details on how to configure rules specific to your RDS or Aurora database.
34
+
Refer to AWS' [database server rules](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html#sg-rules-db-server) for details on how to configure rules specific to your RDS database.
36
35
37
36
:::
38
37
39
-
### Retrieve the database endpoint (Aurora)
40
-
41
-
To retrieve the database endpoint (hostname) for Hyperdrive to connect to:
42
-
43
-
1. Go to **Databases** view under **RDS** in the AWS console.
44
-
2. Select the database you want Hyperdrive to connect to.
45
-
3. Under the **Endpoints** header, note down the **Endpoint name** with the type `Writer` and the **Port**.
46
-
47
-
### Retrieve the database endpoint (RDS PostgreSQL)
38
+
### Retrieve the database endpoint (RDS MySQL)
48
39
49
40
For regular RDS instances (non-Aurora), you will need to fetch the endpoint and port of the database:
50
41
@@ -54,6 +45,12 @@ For regular RDS instances (non-Aurora), you will need to fetch the endpoint and
54
45
55
46
The endpoint will resemble `YOUR_DATABASE_NAME.cpuo5rlli58m.AWS_REGION.rds.amazonaws.com` and the port will default to `5432`.
56
47
48
+
:::note[Support for MySQL-compatible providers]
49
+
50
+
Support for AWS Aurora MySQL databases is coming soon. Join our early preview support by reaching out to us in the [Hyperdrive Discord channel](https://discord.cloudflare.com/).
51
+
52
+
:::
53
+
57
54
## 2. Create your user
58
55
59
56
Once your database is created, you will need to create a user for Hyperdrive to connect as. Although you can use the **Master username** configured during initial database creation, best practice is to create a less privileged user.
Copy file name to clipboardExpand all lines: src/content/docs/hyperdrive/get-started.mdx
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,9 @@ This guide will instruct you through:
21
21
22
22
:::note
23
23
24
-
Hyperdrive currently works with PostgreSQL, MySQL and compatible databases. This includes CockroachDB and Materialize (which are PostgreSQL-compatible), and MariaDB and Planetscale (which are MySQL compatible).
24
+
Hyperdrive currently works with PostgreSQL, MySQL and many compatible databases. This includes CockroachDB and Materialize (which are PostgreSQL-compatible), and Planetscale.
25
+
26
+
Learn more about the [databases that Hyperdrive supports](/hyperdrive/reference/supported-databases-and-features).
25
27
26
28
:::
27
29
@@ -110,13 +112,14 @@ Hyperdrive accepts the combination of these parameters in the common connection
110
112
111
113
```
112
114
113
-
Most database providers will provide a connection string you can directly copy-and-paste directly into Hyperdrive.
115
+
Most database providers will provide a connection string you can directly copy-and-paste directly into Hyperdrive.
114
116
115
117
To create a Hyperdrive connection, run the `wrangler` command, replacing the placeholder values passed to the `--connection-string` flag with the values of your existing database:
Most database providers will provide a connection string you can directly copy-and-paste directly into Hyperdrive.
131
+
Most database providers will provide a connection string you can directly copy-and-paste directly into Hyperdrive.
129
132
130
-
To create a Hyperdrive connection, run the `wrangler` command, replacing the placeholder values passed to the `--connection-string` flag with the values of your existing database:
133
+
To create a Hyperdrive connection, run the `wrangler` command, replacing the placeholder values passed to the `--connection-string` flag with the values of your existing database:
Copy file name to clipboardExpand all lines: src/content/docs/hyperdrive/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Turn your existing regional database into a globally distributed database.
32
32
33
33
Hyperdrive is a service that accelerates queries you make to existing databases, making it faster to access your data from across the globe from [Cloudflare Workers](/workers/), irrespective of your users' location.
34
34
35
-
Hyperdrive supports any Postgres or MySQL database, including those hosted on AWS, Google Cloud, Azure, and Neon. Hyperdrive also supports Postgres-compatible databases like CockroachDB and Timescale and MySQL-compatible databases like MariaDB and Planetscale.
35
+
Hyperdrive supports any Postgres or MySQL database, including those hosted on AWS, Google Cloud, Azure, Neon and Planetscale. Hyperdrive also supports Postgres-compatible databases like CockroachDB and Timescale.
36
36
You do not need to write new code or replace your favorite tools: Hyperdrive works with your existing code and tools you use.
37
37
38
38
Use Hyperdrive's connection string from your Cloudflare Workers application with your existing Postgres drivers and object-relational mapping (ORM) libraries:
@@ -180,7 +180,7 @@ Hyperdrive allows you to connect to any PostgreSQL or PostgreSQL-compatible data
180
180
181
181
<Feature header="MySQL support" href="/hyperdrive/examples/connect-to-mysql/" cta="Connect Hyperdrive to your MySQL database">
182
182
183
-
Hyperdrive allows you to connect to any MySQL or MySQL-compatible database.
183
+
Hyperdrive allows you to connect to any MySQL database.
Copy file name to clipboardExpand all lines: src/content/docs/hyperdrive/reference/supported-databases-and-features.mdx
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,12 @@ The following is a non-exhaustive list of database providers:
29
29
| CockroachDB | ✅ | All | Postgres-compatible. Refer to the [CockroachDB](/hyperdrive/examples/connect-to-postgres/cockroachdb/) guide to connect. |
30
30
| Planetscale | ✅ | All | Planetscale currently runs MySQL 8.x |
31
31
32
+
:::note[Support for MySQL-compatible providers]
33
+
34
+
Support for AWS Aurora MySQL and MariaDB databases is coming soon. Join our early preview support by reaching out to us in the [Hyperdrive Discord channel](https://discord.cloudflare.com/).
35
+
36
+
:::
37
+
32
38
## Supported PostgreSQL authentication modes
33
39
34
40
Hyperdrive supports the following [authentication modes](https://www.postgresql.org/docs/current/auth-methods.html) for connecting to PostgreSQL databases:
@@ -54,7 +60,7 @@ Hyperdrive does not support the following MySQL features:
54
60
- Non-UTF8 characters in queries
55
61
-`USE` statements
56
62
- Multi-statement queries
57
-
- Prepared statement queries via SQL (using `PREPARE` and `EXECUTE` statements)
63
+
- Prepared statement queries via SQL (using `PREPARE` and `EXECUTE` statements) and [protocol-level prepared statements](https://sidorares.github.io/node-mysql2/docs/documentation/prepared-statements).
58
64
-`COM_INIT_DB` messages
59
65
-[Authentication plugins](https://dev.mysql.com/doc/refman/8.4/en/authentication-plugins.html) other than `caching_sha2_password` or `mysql_native_password`
0 commit comments