> ## Documentation Index
> Fetch the complete documentation index at: https://vexidata.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Database

> Connect your Azure Database for PostgreSQL, MySQL, or SQL Server to VexiData.

## Prerequisites

* An [Azure](https://portal.azure.com) account with an Azure Database for PostgreSQL, MySQL (Flexible Server), or Azure SQL Database
* A [VexiData](https://vexidata.com) account

## Connect Azure Database to VexiData

<Steps>
  <Step title="Get your connection details">
    1. Log in to the [Azure Portal](https://portal.azure.com)
    2. Navigate to your database server
    3. On the **Overview** page, copy the **Server name** (FQDN)

    | Parameter    | PostgreSQL Example                     | MySQL Example                       | SQL Server Example              |
    | ------------ | -------------------------------------- | ----------------------------------- | ------------------------------- |
    | **Host**     | `myserver.postgres.database.azure.com` | `myserver.mysql.database.azure.com` | `myserver.database.windows.net` |
    | **Port**     | `5432`                                 | `3306`                              | `1433`                          |
    | **Database** | Your database name                     | Your database name                  | Your database name              |
    | **Username** | Your admin username                    | Your admin username                 | Your admin username             |
    | **Password** | Your admin password                    | Your admin password                 | Your admin password             |

    <Info>
      On Flexible Server, use your plain username (e.g., `myadmin`). The `@servername` suffix is not required.
    </Info>
  </Step>

  <Step title="Add VexiData to firewall rules">
    Azure blocks all external connections by default. You must add VexiData's IP addresses.

    1. Go to your database server's **Networking** page
    2. Under **Firewall rules**, click **Add a firewall rule**
    3. Add each of VexiData's IPs:

    | Rule name | Start IP        | End IP          |
    | --------- | --------------- | --------------- |
    | VexiData  | `46.101.71.122` | `46.101.71.122` |

    4. Click **Save**

    <Note>
      Firewall changes can take up to **5 minutes** to apply. If your connection fails immediately after saving, wait and try again.
    </Note>
  </Step>

  <Step title="Add the connection in VexiData">
    1. Go to [Data Sources](https://vexidata.com/data-sources) in VexiData
    2. Click **PostgreSQL**, **MySQL**, or **SQL Server** depending on your server type
    3. Fill in the details:

    | Field            | Value                                                                                              |
    | ---------------- | -------------------------------------------------------------------------------------------------- |
    | **Display Name** | A name to identify this connection (e.g., "Azure Production")                                      |
    | **Host**         | Your server FQDN (e.g., `myserver.postgres.database.azure.com` or `myserver.database.windows.net`) |
    | **Port**         | `5432` (PostgreSQL), `3306` (MySQL), or `1433` (SQL Server)                                        |
    | **Database**     | Your database name                                                                                 |
    | **Schema**       | `public` (PostgreSQL) or `dbo` (SQL Server)                                                        |
    | **Username**     | Your admin username                                                                                |
    | **Password**     | Your admin password                                                                                |
  </Step>

  <Step title="Test and save">
    Click **Test & Save Connection**. VexiData will verify it can reach your database. Once connected, your schema will be analyzed automatically.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection timed out">
    * Verify VexiData's IPs are in your **Firewall rules**. Changes take up to 5 minutes to apply
    * Make sure you're using the **Server name** (FQDN), not an IP address
    * Check that your server is running in the Azure Portal
  </Accordion>

  <Accordion title="SSL connection errors">
    * Azure enforces SSL (TLS 1.2+) by default. VexiData handles this automatically
    * If you see SSL errors, verify the host and port are correct
  </Accordion>

  <Accordion title="Authentication failed">
    * For PostgreSQL and MySQL (Flexible Server), use your plain username without the `@servername` suffix
    * For Azure SQL Database, use your admin login configured during creation
    * Reset your password from the Azure Portal if needed
  </Accordion>

  <Accordion title="No tables visible after connecting">
    * For PostgreSQL, confirm your tables are in the `public` schema. For SQL Server, confirm they're in the `dbo` schema. Update the **Schema** field in VexiData if they're in a custom schema
    * Check that your database user has `SELECT` permissions on the tables
  </Accordion>
</AccordionGroup>
