Skip to content

Commit b34c9a6

Browse files
authored
Update index.mdx (#24224)
1 parent 6b2c39b commit b34c9a6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/content/docs/hyperdrive/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ import { createConnection } from 'mysql2/promise';
103103
export default {
104104
async fetch(request, env, ctx): Promise<Response> {
105105
const connection = await createConnection({
106-
host: env.DB_HOST,
107-
user: env.DB_USER,
108-
password: env.DB_PASSWORD,
109-
database: env.DB_NAME,
110-
port: env.DB_PORT
106+
host: env.HYPERDRIVE.host,
107+
user: env.HYPERDRIVE.user,
108+
password: env.HYPERDRIVE.password,
109+
database: env.HYPERDRIVE.database,
110+
port: env.HYPERDRIVE.port,
111111

112112
// This is needed to use mysql2 with Workers
113113
// This configures mysql2 to use static parsing instead of eval() parsing (not available on Workers)

0 commit comments

Comments
 (0)