Resizing Vultr Managed Databases for MySQL allows you to scale your database resources as your data grows. Scaling up is useful if your current database plan can't handle your workload. Upsizing your managed database cluster adds more CPUs, RAM, storage, and replica nodes to provide a better experience to your end-users.
Follow this guide to resize Vultr Managed Databases for MySQL using Vultr Customer Portal, API, CLI, or Terraform.
List all the database instances by sending a GET
request to the List Managed Databases endpoint and note the database ID. For example, 43b4c774-5dff-4ac0-a01f-78a23c2205b5
.
$ curl "https://api.vultr.com/v2/databases" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a PUT
request to the Update Managed Database endpoint to change the database plan and specify the database ID and the new plan (For instance, vultr-dbaas-business-cc-1-55-2
).
$ curl "https://api.vultr.com/v2/databases/database_id" \
-X PUT \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"plan" : "vultr-dbaas-startup-cc-1-55-2"
}'
Visit the Update Managed Database endpoint to view additional attributes to add to your request.
List all database instances and note the database ID. For instance, d6ac2a3c-92ea-43ef-8185-71a23e58ad8c
.
$ vultr-cli database list --summarize
Update the database plan by specifying a database ID and a new plan (For instance, vultr-dbaas-business-cc-1-55-2
).
$ vultr-cli database update database_id \
--plan vultr-dbaas-business-cc-1-55-2
Run vultr-cli database update --help
to view all options.
Open your Terraform configuration and locate the Managed Database for MySQL resource.
Update the plan
argument with the new database plan ID.
resource "vultr_database" "mysql" {
label = "mysql-cluster-1"
database_engine = "mysql"
database_engine_version = "8"
region = "ewr"
plan = "vultr-dbaas-business-cc-1-55-2" # Updated plan
}
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
No comments yet.