---
title: Provisioning
url: https://docs.vultr.com/products/storage/databases/mysql/provisioning
description: A guide explaining how to set up and configure Vultr Managed Databases for MySQL
publish_date: 2024-09-23T20:21:29.543509Z
last_updated: 2026-05-26T19:43:57.271169Z
---

# How to Provision Vultr Managed Databases for MySQL

Vultr Managed Databases for MySQL is a highly available, scalable, and secure relational database system that offers speed and reliability. You can integrate a Vultr Managed Databases for MySQL cluster in modern applications and programming languages such as Python, PHP, and Node.js, while choosing from CPU-optimized, memory-optimized and general-purpose server types. In addition, you can create database users, configure trusted sources, and download SSL certificates to access the cluster and integrate it in existing applications.

Follow this guide to provision Vultr Managed Databases for MySQL using the Vultr Console, API, CLI, or Terraform.

=== "Vultr Console"

    1. Navigate to **Products** and click **Databases**.
    1. Click **Add Managed Database**.
    1. Select **MySQL** as the database engine and note the MySQL version.
    1. Select the **Server Type** drop-down and select your desired backend server type.
    1. Click **Plan** and select the server specifications.
    1. Click the **Number of Failover Replica Nodes** drop-down and select the number of **failover replica nodes** to add to your cluster.
    1. Select your desired server location.
    1. Optional: Click the **VPC** drop-down and select a VPC network to attach to the cluster.
    1. Enter a descriptive label in the **Label** field.
    1. Review the selected plan and cost estimates.
    1. Click **Deploy Now** to provision the Vultr Managed Databases for MySQL cluster.

=== "Vultr API"

    1. Send a `GET` request to the [**List Regions** endpoint](https://www.vultr.com/api/#tag/region/operation/list-regions) and note your target Vultr region ID.

        ```console
        $ curl "https://api.vultr.com/v2/regions" \
          -X GET \
          -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `GET` request to the [**List Managed Database Plans** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/list-database-plans) to view all available database engines and plans in your target Vultr region.

        ```console
        $ curl "https://api.vultr.com/v2/databases/plans?region=<region-id>" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `POST` request to the [**Create Database** endpoint](https://api.vultr.com/v2/databases) to provision a Vultr Managed Databases for MySQL cluster, specifying your target server plan, database engine, and Vultr region.

        ```console
        $ curl "https://api.vultr.com/v2/databases" \
            -X POST \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json" \
            --data '{
                "database_engine" : "mysql",
                "database_engine_version" : "<version>",
                "plan" : "<server-plan>",
                "region" : "<region-id>",        
                "label" : "<label>"
            }'
        ```

        Visit the [**Create Database** endpoint](https://api.vultr.com/v2/databases) to view additional attributes to apply on your Vultr Managed Databases for MySQL provisioning request.

    1. Send a `GET` request to the [**List Managed Databases** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/list-databases) to view all Vultr Managed Databases for MySQL clusters in your account.

        ```console
        $ curl "https://api.vultr.com/v2/databases" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json"
        ```

=== "Vultr CLI"

    1. List all Vultr regions and note your target region ID.

        ```console
        $ vultr-cli regions list
        ```

    1. List all available Vultr Managed Databases plans and note your target plan.

        ```console
        $ vultr-cli database plan list
        ```

    1. Provision a Vultr Managed Databases for MySQL cluster, specifying your target plan, database engine version, and Vultr region.

        ```console
        $ vultr-cli database create \
        --database-engine mysql \
        --database-engine-version <version> \
        --plan <server-plan> \
        --region <region-id> \
        --label <label>
        ```

        Run `vultr-cli database create --help` to view additional options to apply to your Vultr Managed Databases for MySQL provisioning request.
    
    1. List all Vultr Managed Databases clusters in your account.

        ```console
        $ vultr-cli database list --summarize
        ```

=== "Terraform"

    1. Ensure the [Vultr Terraform provider](https://registry.terraform.io/providers/vultr/vultr/latest/docs) is configured in your Terraform project.

    1. Define the Managed Database for MySQL in your Terraform configuration file.

        ```terraform
        terraform {
            required_providers {
                vultr = {
                    source  = "vultr/vultr"
                    version = "~> 2.26"
                }
            }
        }

        provider "vultr" {}

        resource "vultr_database" "mysql" {
            database_engine         = "mysql"
            database_engine_version = "8"
            region                  = "ewr"  # e.g., ewr, ams, sgp
            plan                    = "vultr-dbaas-startup-cc-1-55-2"
            label                   = "mysql-cluster-1"

            # Optional
            # vpc_id       = "<vpc-id>"
            # trusted_ips  = ["192.0.2.1", "192.0.2.2"]
        }

        output "mysql_host" { value = vultr_database.mysql.host }
        output "mysql_port" { value = vultr_database.mysql.port }
        ```

    1. Apply the configuration and observe the following output:

        ```
        Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
        ```
