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

# Public Cloud databases

> Use fully managed relational and NoSQL databases — MySQL, PostgreSQL, Redis, MongoDB, and more.

OVHcloud Public Cloud Databases (DBaaS) let you deploy and use managed database clusters without handling installation, patching, or infrastructure maintenance. OVHcloud operates the database engine, storage, and availability; you manage your data, users, and application connections.

## Supported engines

<CardGroup cols={2}>
  <Card title="MySQL" icon="database" href="/public-cloud/databases">
    Fully managed MySQL with automated backups, SSL connections, and support for advanced parameters.
  </Card>

  <Card title="PostgreSQL" icon="database" href="/public-cloud/databases">
    Managed PostgreSQL with extensions, connection pooling (PgBouncer), and high-availability plans.
  </Card>

  <Card title="MongoDB" icon="database" href="/public-cloud/databases">
    Managed document database with replica set support and compatibility with official MongoDB drivers.
  </Card>

  <Card title="Redis / Valkey" icon="bolt" href="/public-cloud/databases">
    In-memory key-value store for caching, session management, and real-time leaderboards.
  </Card>

  <Card title="Kafka" icon="arrows-left-right" href="/public-cloud/databases">
    Managed message broker for high-throughput event streaming and data pipelines.
  </Card>

  <Card title="OpenSearch" icon="magnifying-glass" href="/public-cloud/databases">
    Managed search and analytics engine, compatible with Elasticsearch APIs.
  </Card>

  <Card title="Cassandra" icon="database" href="/public-cloud/databases">
    Managed wide-column store for distributed, highly available workloads.
  </Card>

  <Card title="Grafana" icon="chart-line" href="/public-cloud/databases">
    Managed data visualisation dashboards, pre-integrated with OVHcloud metrics.
  </Card>
</CardGroup>

## Creating a managed database cluster

<Steps>
  <Step title="Open the Databases section">
    In the OVHcloud Control Panel, go to your Public Cloud project and click **Databases** in the left menu under **Databases & Analytics**.
  </Step>

  <Step title="Start the creation wizard">
    Click **Create a database instance** (or **Create a service** if you already have databases in the project).
  </Step>

  <Step title="Select the engine and version">
    Choose your database engine (e.g. PostgreSQL) and select the version to install from the drop-down menu.
  </Step>

  <Step title="Choose a service plan">
    Select the plan that matches your availability requirements:

    * **Essential** — single node, no high availability
    * **Business** — multi-node with automatic failover
    * **Enterprise** — highest availability with additional SLA guarantees

    You can upgrade the plan after creation.
  </Step>

  <Step title="Select a region">
    Choose the geographic region where your cluster will be hosted. Pick a region close to your application instances to minimise latency.
  </Step>

  <Step title="Configure nodes">
    Choose the node template (flavor) that sets the CPU, RAM, and storage for each node. Review the pricing shown at this step.
  </Step>

  <Step title="Set cluster size and storage">
    For engines that support it, set the number of nodes in your cluster and add extra storage if needed.
  </Step>

  <Step title="Configure networking">
    By default, the cluster is accessible over the public Internet with IP allowlisting. To connect via a private network, check **Private** and select an existing subnet in your vRack.
  </Step>

  <Step title="Confirm and wait for deployment">
    Review the order summary and click **Create**. Your cluster is typically ready within a few minutes. The Control Panel displays messages as deployment progresses.
  </Step>
</Steps>

## Connecting to your database

### Authorise your IP address

Before connecting, whitelist your client IP address. OVHcloud blocks all incoming connections by default.

1. Open your database service in the Control Panel.
2. Go to the **Authorised IPs** tab.
3. Enter your IP address or CIDR block and click the `+` button, then **Save changes**.

<Warning>
  Using `0.0.0.0/0` allows connections from any IP. Only use this during development and restrict it before going to production.
</Warning>

### Retrieve connection information

Open the **Dashboard** tab of your database service. The **Connection information** section shows the host, port, and default database name. Navigate to the **Users** tab to find or create a username and password.

### Connection string examples

<CodeGroup>
  ```bash MySQL / CLI theme={null}
  mysql --host=mysql-abc123.database.cloud.ovh.net \
        --port=20184 \
        --user=avnadmin \
        --password \
        --ssl-ca=/path/to/ca.pem \
        defaultdb
  ```

  ```bash PostgreSQL / CLI theme={null}
  psql "host=pg-abc123.database.cloud.ovh.net \
        port=20184 \
        dbname=defaultdb \
        user=avnadmin \
        password=YOUR_PASSWORD \
        sslmode=require"
  ```

  ```python Python (psycopg2) theme={null}
  import psycopg2

  conn = psycopg2.connect(
      host="pg-abc123.database.cloud.ovh.net",
      port=20184,
      dbname="defaultdb",
      user="avnadmin",
      password="YOUR_PASSWORD",
      sslmode="require",
      sslrootcert="/path/to/ca.pem"
  )
  cursor = conn.cursor()
  cursor.execute("SELECT version();")
  print(cursor.fetchone())
  conn.close()
  ```

  ```python Python (pymongo) theme={null}
  from pymongo import MongoClient

  client = MongoClient(
      "mongodb+srv://avnadmin:YOUR_PASSWORD"
      "@mongo-abc123.database.cloud.ovh.net/defaultdb"
      "?tls=true&tlsCAFile=/path/to/ca.pem"
  )
  db = client["defaultdb"]
  print(db.list_collection_names())
  ```
</CodeGroup>

<Note>
  All Public Cloud Database connections require TLS/SSL. Download the CA certificate from the **Dashboard** tab of your service and reference it in your connection string.
</Note>

## User and access management

Each database service is created with a default admin user (`avnadmin`) that has full privileges. You can create additional users with more restricted permissions.

1. In the Control Panel, open your database service.
2. Go to the **Users** tab.
3. Click **Add user**, enter a username, and click **Create User**.
4. Use the `...` menu to set or regenerate the user's password.

For MySQL, newly created users start with no privileges. Grant the required permissions using SQL:

```sql theme={null}
GRANT SELECT, INSERT, UPDATE, DELETE ON mydb.* TO 'myuser'@'%';
FLUSH PRIVILEGES;
```

## Backups and restore

OVHcloud creates automated backups for all managed database services. Backup frequency and retention period depend on the service plan.

* **Essential plan** — daily backups, 2-day retention
* **Business plan** — daily backups, 14-day retention
* **Enterprise plan** — daily backups with extended retention

To restore from a backup:

1. Open your database service in the Control Panel.
2. Go to the **Backups** tab.
3. Click **Restore** on the backup you want to use.
4. A new database service is created from the selected backup.

<Tip>
  You cannot restore a backup into the same running cluster. Restoration always creates a new service instance.
</Tip>

## Scaling and node management

You can scale your cluster without downtime:

* **Upgrade the flavor** — increase CPU and RAM for each node via the **Upgrade the node template** option.
* **Add storage** — increase disk size from the **Resize storage** option.
* **Change plan** — move from Essential to Business or Enterprise to gain high availability.

Changes are applied with a rolling restart to maintain service availability on multi-node plans.

## Shared responsibility model

OVHcloud manages the database infrastructure. You are responsible for your data and application-level configuration.

| Responsibility                               | OVHcloud    | You         |
| -------------------------------------------- | ----------- | ----------- |
| Physical infrastructure and virtual machines | Responsible | —           |
| Database engine installation and patching    | Responsible | —           |
| Automated backups                            | Responsible | —           |
| IP allowlist and user access                 | —           | Responsible |
| Data content and schema                      | —           | Responsible |
| Application-level performance tuning         | —           | Responsible |
| Business continuity planning                 | Informed    | Responsible |
| Data export and migration                    | Informed    | Responsible |

## Related guides

<CardGroup cols={2}>
  <Card title="MySQL — prepare for connections" icon="database" href="/public-cloud/databases">
    Whitelist IPs, create users, and retrieve connection credentials for MySQL.
  </Card>

  <Card title="PostgreSQL extensions" icon="puzzle-piece" href="/public-cloud/databases">
    Enable and manage PostgreSQL extensions like PostGIS and pgvector.
  </Card>

  <Card title="MongoDB getting started" icon="leaf" href="/public-cloud/databases">
    Connect to Managed MongoDB using Compass, the CLI, or a driver.
  </Card>

  <Card title="Kafka getting started" icon="arrows-left-right" href="/public-cloud/databases">
    Create topics, configure producers and consumers on Managed Kafka.
  </Card>
</CardGroup>
