跳转到主要内容

Azure Database

import { Render } from "~/components";

This example shows you how to connect Hyperdrive to an Azure Database for MySQL instance.

1. Allow Hyperdrive access

To allow Hyperdrive to connect to your database, you will need to ensure that Hyperdrive has valid credentials and network access.

Azure Portal

Public access networking

To connect to your Azure Database for MySQL instance using public Internet connectivity:

  1. In the Azure Portal, select the instance you want Hyperdrive to connect to.
  2. Expand Settings > Networking > ensure Public access is enabled > in Firewall rules add 0.0.0.0 as Start IP address and 255.255.255.255 as End IP address.
  3. Select Save to persist your changes.
  4. Select Overview from the sidebar and note down the Server name of your instance.

With the username, password, server name, and database name (default: mysql), you can now create a Hyperdrive database configuration.

Private access networking

To connect to a private Azure Database for MySQL instance, refer to Connect to a private database using Tunnel.

2. Create a database configuration