Managed Databases v4.176.0
List managed databases
This operation is currently only available for customers who already have an active Managed Database.
Display all Managed Databases that are accessible by your User, regardless of engine type.
For more detailed information on a particular Database instance, make a request to its instance_uri
.
OAuth.
databases:read_only
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/instances
linode-cli databases list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"instance_uri": "/v4/databases/mysql/instances/123",
"label": "example-db",
"region": "us-east",
"status": "active",
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||
page | integer Read-only The current page. | ||||||||||||||||||||||||||||||||||||||||||||
pages | integer Read-only The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||
results | integer Read-only The total number of results. |
errors | array
of objects
|
List managed MySQL databases
This operation is currently only available for customers who already have an active Managed Database.
Display all accessible Managed MySQL Databases.
CLI.
linode-cli databases mysql-list
OAuth.
databases:read_only
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/
linode-cli databases mysql-list
Response Samples
{
"data": [
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
page | integer Read-only The current page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
pages | integer Read-only The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
results | integer Read-only The total number of results. |
errors | array
of objects
|
Create a managed MySQL database
This operation is currently only available for customers who already have an active Managed Database.
Provision a Managed MySQL Database.
Restricted Users must have the add_databases
grant to use this operation.
New instances can take approximately 15 to 30 minutes to provision.
The allow_list
is used to control access to the Managed Database.
IP addresses and ranges in this list can access the Managed Database. All other sources are blocked.
If
0.0.0.0/0
is a value in this list, then all IP addresses can access the Managed Database.Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.
All Managed Databases include automatic, daily backups. Up to seven backups are automatically stored for each Managed Database, providing restore points for each day of the past week.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MySQL Database during configurable maintenance windows.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
To modify update the maintenance window for a Database, run the Update a managed MySQL database operation.
CLI.
linode-cli databases mysql-create
OAuth.
databases:read_write
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "example-db",
"region": "us-east",
"type": "g6-dedicated-2",
"cluster_size": 3,
"engine": "mysql/8.0.26",
"encrypted": false,
"ssl_connection": true,
"replication_type": "semi_synch",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
]
}' \
https://api.linode.com/v4/databases/mysql/instances
linode-cli databases mysql-create \
--label example-db1 \
--region us-east \
--type g6-dedicated-2 \
--cluster_size 3 \
--engine mysql/8.0.26 \
--encrypted false \
--ssl_connection false \
--replication_type semi_synch \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If |
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. |
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. |
engine Required | string The Managed Database engine in engine/version format. |
label Required | string
3..32
charactersA unique, user-defined string referring to the Managed Database. |
region Required | string The Region ID for the Managed Database. |
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be |
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Run the Get managed MySQL database credentials operation for access information. |
type Required | string The Linode Instance type used by the Managed Database for its nodes. |
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> Read-only When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string Read-only The Managed Database engine type. | ||||||||||
hosts | object Read-only The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer Read-only A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Run the Get managed MySQL database credentials operation for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up Read-only The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> Read-only When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string Read-only The Managed Database engine version. |
errors | array
of objects
|
Delete a managed MySQL database
This operation is currently only available for customers who already have an active Managed Database.
Remove a Managed MySQL Database from your Account.
Requires read_write
access to the Database.
The Database must have an active
, failed
, or degraded
status to perform this operation.
Only unrestricted Users can access this operation, and have access regardless of the acting token’s OAuth scopes.
CLI.
linode-cli databases mysql-delete
OAuth.
databases:read_write
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Get a managed MySQL database
This operation is currently only available for customers who already have an active Managed Database.
Display information for a single, accessible Managed MySQL Database.
CLI.
linode-cli databases mysql-view
OAuth.
databases:read_only
Authorizations
personalAccessToken | |
oauth | databases:read_only |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-view 123
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> Read-only When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string Read-only The Managed Database engine type. | ||||||||||
hosts | object Read-only The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer Read-only A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Run the Get managed MySQL database credentials operation for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up Read-only The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> Read-only When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string Read-only The Managed Database engine version. |
errors | array
of objects
|
Update a managed MySQL database
This operation is currently only available for customers who already have an active Managed Database.
Update a Managed MySQL Database.
Requires read_write
access to the Database.
The Database must have an active
status to perform this operation.
Updating addresses in the allow_list
overwrites any existing addresses.
IP addresses and ranges in this list can access the Managed Database. All other sources are blocked.
If
0.0.0.0/0
is a value in this list, then all IP addresses can access the Managed Database.Entering an empty array (
[]
) blocks all connections (both public and private) to the Managed Database.Note. Updates to the
allow_list
may take a short period of time to complete, making this operation inappropriate for rapid successive updates to this property.
All Managed Databases include automatic patch updates, which apply security patches and updates to the underlying operating system of the Managed MySQL Database. The maintenance window for these updates is configured with the Managed Database’s updates
property.
If your database cluster is configured with a single node, you will experience downtime during this maintenance window when any updates occur. It’s recommended that you adjust this window to match a time that will be the least disruptive for your application and users. You may also want to consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
CLI.
linode-cli databases mysql-update
OAuth.
databases:read_write
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "example-db",
"allow_list": [
"203.0.113.1",
"192.0.1.0/24"
],
"type": "g6-standard-1",
"updates": {
"frequency": "monthly",
"duration": 3,
"hour_of_day": 12,
"day_of_week": 4,
"week_of_month": 3
}
}' \
https://api.linode.com/v4/databases/mysql/instances/123
linode-cli databases mysql-update 123 \
--label example-db \
--allow_list 203.0.113.1 \
--allow_list 192.0.1.0/24 \
--type g6-standard-1 \
--updates.frequency monthly \
--updates.duration 3 \
--updates.hour_of_day 12 \
--updates.day_of_week 4 \
--updates.week_of_month 3
Request Body Schema
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
type | string Request re-sizing of your cluster to a Linode Type with more disk space. For example, you could request a Linode Type that uses a higher plan.
| ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
|
Response Samples
{
"allow_list": [
"203.0.113.1/32",
"192.0.1.0/24"
],
"cluster_size": 3,
"created": "2022-01-01T00:01:01",
"encrypted": false,
"engine": "mysql",
"hosts": {
"primary": "lin-123-456-mysql-mysql-primary.servers.linodedb.net",
"secondary": "lin-123-456-mysql-primary-private.servers.linodedb.net"
},
"id": 123,
"label": "example-db",
"port": 3306,
"region": "us-east",
"replication_type": "semi_synch",
"ssl_connection": true,
"status": "active",
"total_disk_size_gb": 15,
"type": "g6-dedicated-2",
"updated": "2022-01-01T00:01:01",
"updates": {
"day_of_week": 1,
"duration": 3,
"frequency": "weekly",
"hour_of_day": 0,
"week_of_month": null
},
"used_disk_size_gb": 2,
"version": "8.0.26"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
allow_list | array
of strings A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. By default, this is an empty array ( If | ||||||||||
cluster_size | integer Enum:
1
3
Default:
1 The number of Linode Instance nodes deployed to the Managed Database. Choosing 3 nodes creates a high availability cluster consisting of 1 primary node and 2 replica nodes. | ||||||||||
created | string<date-time> Read-only When this Managed Database was created. | ||||||||||
encrypted | boolean Default:
false Whether the Managed Databases is encrypted. | ||||||||||
engine | string Read-only The Managed Database engine type. | ||||||||||
hosts | object Read-only The primary and secondary hosts for the Managed Database. These are assigned after provisioning is complete.
| ||||||||||
id | integer Read-only A unique ID that can be used to identify and reference the Managed Database. | ||||||||||
label | string
3..32
charactersA unique, user-defined string referring to the Managed Database. | ||||||||||
port | integer The access port for this Managed Database. | ||||||||||
region | string The Region ID for the Managed Database. | ||||||||||
replication_type | string Enum:
none
asynch
semi_synch The replication method used for the Managed Database. Defaults to Must be Must be | ||||||||||
ssl_connection | boolean Default:
true Whether to require SSL credentials to establish a connection to the Managed Database. Run the Get managed MySQL database credentials operation for access information. | ||||||||||
status | string Enum:
provisioning
active
suspending
suspended
resuming
restoring
failed
degraded
updating
backing_up Read-only The operating status of the Managed Database. | ||||||||||
total_disk_size_gb | integer The total disk size of the database in GB. | ||||||||||
type | string The Linode Instance type used by the Managed Database for its nodes. | ||||||||||
updated | string<date-time> Read-only When this Managed Database was last updated. | ||||||||||
updates | object Configuration settings for automated patch update maintenance for the Managed Database.
| ||||||||||
used_disk_size_gb | integer The used space of the database in GB. | ||||||||||
version | string Read-only The Managed Database engine version. |
errors | array
of objects
|
Patch a managed MySQL database
This operation is currently only available for customers who already have an active Managed Database.
Apply security patches and updates to the underlying operating system of the Managed MySQL Database. This function runs during regular maintenance windows, which are configurable with the Update a managed MySQL database operation.
Requires read_write
access to the Database.
The Database must have an active
status to perform this operation.
NOTE
If your database cluster is configured with a single node, you will experience downtime during this maintenance. Consider upgrading to a high availability plan to avoid any downtime due to maintenance.
The database software is not updated automatically. To upgrade to a new database engine version, consider deploying a new Managed Database with your preferred version. You can then migrate your databases from the original Managed Database cluster to the new one.
CLI.
linode-cli databases mysql-patch
OAuth.
databases:read_write
Authorizations
personalAccessToken | |
oauth | databases:read_write |
Path Parameters
instanceId | integer RequiredThe ID of the Managed PostgreSQL Database. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X POST https://api.linode.com/v4/databases/mysql/instances/123/patch
linode-cli databases mysql-patch 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|