# DBaaS Mysql


<style>
  span[class^="pill-"] {
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-right: 12px;
    font-family: sans-serif;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
  }
  span.pill-GET { background-color: #61affe; }
  span.pill-POST { background-color: #49cc90; }
  span.pill-PUT { background-color: #fca130; }
  span.pill-DELETE { background-color: #f93e3e; }
  span.pill-PATCH { background-color: #50e3c2; }
  span[class^="pill-"]:after {
    content: attr(data-label);
    font-size: 0.9rem;
  }
</style>

MySQL, the popular open-source, object-relational database.

[Read more](https://community.exoscale.com/product/dbaas/service-specific/mysql/)

## <span data-label="POST" class="pill-POST"></span>create-dbaas-mysql-database

Create a DBaaS MySQL database

```
POST /dbaas-mysql/{service-name}/database
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `service-name` | `path` | Min length: `0`. Max length: `63`. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `database-name` | string | **yes** | Service database name<br/><br/>Min length: `1`. Max length: `40`. |

<details>
<summary>Example</summary>

```json
{
  "database-name": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-dbaas-mysql-database`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateDBAASMysqlDatabase) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_dbaas_mysql_database) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createDbaasMysqlDatabase(java.lang.String,com.exoscale.sdk.model.CreateDbaasMysqlDatabaseRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-dbaas-mysql-database`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-dbaas-mysql-database

Delete a DBaaS MySQL database

```
DELETE /dbaas-mysql/{service-name}/database/{database-name}
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `service-name` | `path` | Min length: `0`. Max length: `63`. |
| `database-name` | `path` | Min length: `1`. Max length: `64`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-dbaas-mysql-database`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteDBAASMysqlDatabase) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_dbaas_mysql_database) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteDbaasMysqlDatabase(java.lang.String,java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-dbaas-mysql-database`

## <span data-label="POST" class="pill-POST"></span>create-dbaas-mysql-user

Create a DBaaS MySQL user

```
POST /dbaas-mysql/{service-name}/user
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `service-name` | `path` | Min length: `0`. Max length: `63`. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `username` | string | **yes** | Username<br/><br/>Min length: `1`. Max length: `64`. |
| `authentication` | string | no | Authentication option<br/><br/>Allowed values: `caching_sha2_password`, `mysql_native_password`. |

<details>
<summary>Example</summary>

```json
{
  "authentication": "caching_sha2_password",
  "username": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-dbaas-mysql-user`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateDBAASMysqlUser) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_dbaas_mysql_user) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createDbaasMysqlUser(java.lang.String,com.exoscale.sdk.model.CreateDbaasMysqlUserRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-dbaas-mysql-user`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-dbaas-mysql-user

Delete a DBaaS MySQL user

```
DELETE /dbaas-mysql/{service-name}/user/{username}
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `service-name` | `path` | Min length: `0`. Max length: `63`. |
| `username` | `path` | Min length: `1`. Max length: `64`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-dbaas-mysql-user`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteDBAASMysqlUser) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_dbaas_mysql_user) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteDbaasMysqlUser(java.lang.String,java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-dbaas-mysql-user`

## <span data-label="GET" class="pill-GET"></span>reveal-dbaas-mysql-user-password

Reveal the secrets of a DBaaS MySQL user

```
GET /dbaas-mysql/{service-name}/user/{username}/password/reveal
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `service-name` | `path` | Min length: `0`. Max length: `63`. |
| `username` | `path` | Min length: `1`. Max length: `64`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `password` | string | MySQL password |
| `username` | string | MySQL username |

<details>
<summary>Example output</summary>

```json
{
  "password": "string",
  "username": "string"
}
```
</details>


SDK reference for `reveal-dbaas-mysql-user-password`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.RevealDBAASMysqlUserPassword) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reveal_dbaas_mysql_user_password) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#revealDbaasMysqlUserPassword(java.lang.String,java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reveal-dbaas-mysql-user-password`

## <span data-label="PUT" class="pill-PUT"></span>reset-dbaas-mysql-user-password

Reset the credentials of a DBaaS mysql user

```
PUT /dbaas-mysql/{service-name}/user/{username}/password/reset
```

If no password is provided one will be generated automatically.

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `service-name` | `path` | Min length: `0`. Max length: `63`. |
| `username` | `path` | Min length: `1`. Max length: `64`. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `authentication` | string | no | Authentication method<br/><br/>Allowed values: `caching_sha2_password`, `mysql_native_password`. |
| `password` | string | no | New password<br/><br/>Min length: `8`. Max length: `256`. |

<details>
<summary>Example</summary>

```json
{
  "authentication": "caching_sha2_password",
  "password": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `reset-dbaas-mysql-user-password`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ResetDBAASMysqlUserPassword) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.reset_dbaas_mysql_user_password) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#resetDbaasMysqlUserPassword(java.lang.String,java.lang.String,com.exoscale.sdk.model.ResetDbaasMysqlUserPasswordRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api reset-dbaas-mysql-user-password`

## <span data-label="POST" class="pill-POST"></span>create-dbaas-service-mysql

Create a DBaaS MySQL service

```
POST /dbaas-mysql/{name}
```

Create a DBaaS MySQL service

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` | Min length: `0`. Max length: `63`. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `plan` | string | **yes** | Subscription plan<br/><br/>Min length: `1`. Max length: `128`. |
| `admin-password` | string | no | Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.<br/><br/>Min length: `8`. Max length: `256`. |
| `admin-username` | string | no | Custom username for admin user. This must be set only when a new service is being created.<br/><br/>Min length: `1`. Max length: `64`. |
| `backup-schedule` | [Backup Schedule](#backup-schedule) | no |  |
| `binlog-retention-period` | integer | no | The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.<br/><br/>Min: `600`. Max: `86400`. |
| `fork-from-service` | string | no | Service to fork from<br/><br/>Min length: `0`. Max length: `63`. |
| `integrations` | array of [Integrations](#integrations) | no | Service integrations to be enabled when creating the service. |
| `ip-filter` | array[string] | no | Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' |
| `maintenance` | [Maintenance](#maintenance) | no | Automatic maintenance settings |
| `migration` | [Migration](#migration) | no | Migrate data from existing server |
| `mysql-settings` | [mysql.conf configuration values](/reference/api/_schemas/json-schema-mysql/) | no | MySQL-specific settings |
| `recovery-backup-time` | string | no | ISO time of a backup to recover from for services that support arbitrary times<br/><br/>Min length: `1`. |
| `termination-protection` | boolean | no | Service is protected against termination and powering off |
| `version` | string | no | MySQL major version<br/><br/>Min length: `1`. |

<details>
<summary>Example</summary>

```json
{
  "admin-password": "string",
  "admin-username": "string",
  "backup-schedule": {
    "backup-hour": 0,
    "backup-minute": 0
  },
  "binlog-retention-period": 0,
  "fork-from-service": "string",
  "integrations": [
    {
      "dest-service": "string",
      "settings": {},
      "source-service": "string",
      "type": "read_replica"
    }
  ],
  "ip-filter": [
    "string"
  ],
  "maintenance": {
    "dow": "saturday",
    "time": "string"
  },
  "migration": {
    "dbname": "string",
    "host": "string",
    "ignore-dbs": "string",
    "method": "dump",
    "password": "string",
    "port": 0,
    "ssl": true,
    "username": "string"
  },
  "mysql-settings": {
    "connect_timeout": 0,
    "default_time_zone": "+03:00",
    "group_concat_max_len": 0,
    "information_schema_stats_expiry": 0,
    "innodb_change_buffer_max_size": 0,
    "innodb_flush_neighbors": 0,
    "innodb_ft_min_token_size": 0,
    "innodb_ft_server_stopword_table": "db_name/table_name",
    "innodb_lock_wait_timeout": 0,
    "innodb_log_buffer_size": 0,
    "innodb_online_alter_log_max_size": 0,
    "innodb_print_all_deadlocks": true,
    "innodb_read_io_threads": 0,
    "innodb_rollback_on_timeout": true,
    "innodb_thread_concurrency": 0,
    "innodb_write_io_threads": 0,
    "interactive_timeout": 0,
    "internal_tmp_mem_storage_engine": "TempTable",
    "log_output": "INSIGHTS",
    "long_query_time": 0,
    "max_allowed_packet": 0,
    "max_heap_table_size": 0,
    "net_buffer_length": 0,
    "net_read_timeout": 0,
    "net_write_timeout": 0,
    "slow_query_log": true,
    "sort_buffer_size": 0,
    "sql_mode": "ANSI,TRADITIONAL",
    "sql_require_primary_key": true,
    "tmp_table_size": 0,
    "wait_timeout": 0
  },
  "plan": "string",
  "recovery-backup-time": "string",
  "termination-protection": true,
  "version": "string"
}
```
</details>


### Backup Schedule {#backup-schedule}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `backup-hour` | integer | no | The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.<br/><br/>Min: `0`. Max: `23`. |
| `backup-minute` | integer | no | The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.<br/><br/>Min: `0`. Max: `59`. |

### Integrations {#integrations}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | **yes** | Integration type<br/><br/>Allowed values: `read_replica`. |
| `dest-service` | string | no | A destination service<br/><br/>Min length: `0`. Max length: `63`. |
| `settings` | object | no | Integration settings |
| `source-service` | string | no | A source service<br/><br/>Min length: `0`. Max length: `63`. |

### Maintenance {#maintenance}

Automatic maintenance settings

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `dow` | string | **yes** | Day of week for installing updates<br/><br/>Allowed values: `saturday`, `tuesday`, `never`, `wednesday`, `sunday`, `friday`, `monday`, `thursday`. |
| `time` | string | **yes** | Time for installing updates, UTC<br/><br/>Min length: `8`. Max length: `8`. |

### Migration {#migration}

Migrate data from existing server

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | **yes** | Hostname or IP address of the server where to migrate data from<br/><br/>Min length: `1`. Max length: `255`. |
| `port` | integer | **yes** | Port number of the server where to migrate data from<br/><br/>Min: `1`. Max: `65535`. |
| `dbname` | string | no | Database name for bootstrapping the initial connection<br/><br/>Min length: `1`. Max length: `63`. |
| `ignore-dbs` | string | no | Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)<br/><br/>Min length: `1`. Max length: `2048`. |
| `method` | string | no | The migration method to be used<br/><br/>Allowed values: `dump`, `replication`. |
| `password` | string | no | Password for authentication with the server where to migrate data from<br/><br/>Min length: `1`. Max length: `255`. |
| `ssl` | boolean | no | The server where to migrate data from is secured with SSL |
| `username` | string | no | User name for authentication with the server where to migrate data from<br/><br/>Min length: `1`. Max length: `255`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-dbaas-service-mysql`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateDBAASServiceMysql) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_dbaas_service_mysql) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createDbaasServiceMysql(java.lang.String,com.exoscale.sdk.model.CreateDbaasServiceMysqlRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-dbaas-service-mysql`

## <span data-label="GET" class="pill-GET"></span>get-dbaas-service-mysql

Get a DBaaS MySQL service

```
GET /dbaas-mysql/{name}
```

Get a DBaaS MySQL service

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` | Min length: `0`. Max length: `63`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `backup-schedule` | [Backup Schedule](/reference/api/_schemas/dbaas-service-mysql/#backup-schedule) | Backup schedule |
| `backups` | array of [List of backups for the service](/reference/api/_schemas/dbaas-service-backup/) | List of backups for the service |
| `binlog-retention-period` | integer | The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.<br/><br/>Min: `0`. |
| `components` | array of [Components](/reference/api/_schemas/dbaas-service-mysql/#components) | Service component information objects |
| `connection-info` | [Connection Info](/reference/api/_schemas/dbaas-service-mysql/#connection-info) | MySQL connection information properties |
| `created-at` | string | Service creation timestamp (ISO 8601)<br/><br/>ISO 8601 date-time. |
| `databases` | array of [DBaaS Mysql Database Name](/reference/api/_schemas/dbaas-mysql-database-name/) | List of MySQL databases |
| `disk-size` | integer | TODO UNIT disk space for data storage<br/><br/>Min: `0`. |
| `integrations` | array of [DBaaS Integration](/reference/api/_schemas/dbaas-integration/) | Service integrations |
| `ip-filter` | array[string] | Allowed CIDR address blocks for incoming connections |
| `maintenance` | [Automatic maintenance settings](/reference/api/_schemas/dbaas-service-maintenance/) | Automatic maintenance settings |
| `mysql-settings` | [mysql.conf configuration values](/reference/api/_schemas/json-schema-mysql/) | MySQL-specific settings |
| `name` | string | Service name<br/><br/>Min length: `0`. Max length: `63`. |
| `node-count` | integer | Number of service nodes in the active plan<br/><br/>Min: `0`. |
| `node-cpu-count` | integer | Number of CPUs for each node<br/><br/>Min: `0`. |
| `node-memory` | integer | TODO UNIT of memory for each node<br/><br/>Min: `0`. |
| `node-states` | array of [Automatic maintenance settings](/reference/api/_schemas/dbaas-node-state/) | State of individual service nodes |
| `notifications` | array of [Service notifications](/reference/api/_schemas/dbaas-service-notification/) | Service notifications |
| `plan` | string | Subscription plan |
| `prometheus-uri` | [Prometheus URI](/reference/api/_schemas/dbaas-service-mysql/#prometheus-uri) | Prometheus integration URI |
| `state` | string | State of the service<br/><br/>Allowed values: `running`, `rebuilding`, `rebalancing`, `poweroff`. |
| `termination-protection` | boolean | Service is protected against termination and powering off |
| `type` | string | Service type code<br/><br/>Min length: `0`. Max length: `64`. |
| `updated-at` | string | Service last update timestamp (ISO 8601)<br/><br/>ISO 8601 date-time. |
| `uri` | string | URI for connecting to the service (may be absent) |
| `uri-params` | object | service_uri parameterized into key-value pairs |
| `users` | array of [Users](/reference/api/_schemas/dbaas-service-mysql/#users) | List of service users |
| `version` | string | MySQL version |
| `zone` | string | The zone where the service is running |

<details>
<summary>Example output</summary>

```json
{
  "backup-schedule": {
    "backup-hour": 0,
    "backup-minute": 0
  },
  "backups": [
    {
      "backup-name": "string",
      "backup-time": "2024-01-01T12:00:00Z",
      "data-size": 0
    }
  ],
  "binlog-retention-period": 0,
  "components": [
    {
      "component": "string",
      "host": "string",
      "port": 0,
      "route": "dynamic",
      "usage": "primary"
    }
  ],
  "connection-info": {
    "params": [
      {}
    ],
    "standby": [
      "string"
    ],
    "uri": [
      "string"
    ]
  },
  "created-at": "2024-01-01T12:00:00Z",
  "databases": [
    "string"
  ],
  "disk-size": 0,
  "integrations": [
    {
      "description": "string",
      "dest": "string",
      "id": "string",
      "is-active": true,
      "is-enabled": true,
      "settings": {},
      "source": "string",
      "status": "string",
      "type": "string"
    }
  ],
  "ip-filter": [
    "string"
  ],
  "maintenance": {
    "dow": "saturday",
    "time": "string",
    "updates": [
      {
        "deadline": "2024-01-01T12:00:00Z",
        "description": "string",
        "start-after": "2024-01-01T12:00:00Z",
        "start-at": "2024-01-01T12:00:00Z"
      }
    ]
  },
  "mysql-settings": {
    "connect_timeout": 0,
    "default_time_zone": "+03:00",
    "group_concat_max_len": 0,
    "information_schema_stats_expiry": 0,
    "innodb_change_buffer_max_size": 0,
    "innodb_flush_neighbors": 0,
    "innodb_ft_min_token_size": 0,
    "innodb_ft_server_stopword_table": "db_name/table_name",
    "innodb_lock_wait_timeout": 0,
    "innodb_log_buffer_size": 0,
    "innodb_online_alter_log_max_size": 0,
    "innodb_print_all_deadlocks": true,
    "innodb_read_io_threads": 0,
    "innodb_rollback_on_timeout": true,
    "innodb_thread_concurrency": 0,
    "innodb_write_io_threads": 0,
    "interactive_timeout": 0,
    "internal_tmp_mem_storage_engine": "TempTable",
    "log_output": "INSIGHTS",
    "long_query_time": 0,
    "max_allowed_packet": 0,
    "max_heap_table_size": 0,
    "net_buffer_length": 0,
    "net_read_timeout": 0,
    "net_write_timeout": 0,
    "slow_query_log": true,
    "sort_buffer_size": 0,
    "sql_mode": "ANSI,TRADITIONAL",
    "sql_require_primary_key": true,
    "tmp_table_size": 0,
    "wait_timeout": 0
  },
  "name": "string",
  "node-count": 0,
  "node-cpu-count": 0,
  "node-memory": 0,
  "node-states": [
    {
      "name": "string",
      "progress-updates": [
        {
          "completed": true,
          "current": 0,
          "max": 0,
          "min": 0,
          "phase": "stream",
          "unit": "string"
        }
      ],
      "role": "standby",
      "state": "leaving"
    }
  ],
  "notifications": [
    {
      "level": "warning",
      "message": "string",
      "metadata": {},
      "type": "service_powered_off_removal"
    }
  ],
  "plan": "string",
  "prometheus-uri": {
    "host": "string",
    "port": 0
  },
  "state": "running",
  "termination-protection": true,
  "type": "string",
  "updated-at": "2024-01-01T12:00:00Z",
  "uri": "string",
  "uri-params": {},
  "users": [
    {
      "authentication": "string",
      "password": "string",
      "type": "string",
      "username": "string"
    }
  ],
  "version": "string",
  "zone": "string"
}
```
</details>


SDK reference for `get-dbaas-service-mysql`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetDBAASServiceMysql) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_dbaas_service_mysql) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getDbaasServiceMysql(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api get-dbaas-service-mysql`

## <span data-label="PUT" class="pill-PUT"></span>update-dbaas-service-mysql

Update a DBaaS MySQL service

```
PUT /dbaas-mysql/{name}
```

Update a DBaaS MySQL service

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` | Min length: `0`. Max length: `63`. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `backup-schedule` | [Backup Schedule](#backup-schedule) | no |  |
| `binlog-retention-period` | integer | no | The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.<br/><br/>Min: `600`. Max: `86400`. |
| `ip-filter` | array[string] | no | Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16' |
| `maintenance` | [Maintenance](#maintenance) | no | Automatic maintenance settings |
| `migration` | [Migration](#migration) | no | Migrate data from existing server |
| `mysql-settings` | [mysql.conf configuration values](/reference/api/_schemas/json-schema-mysql/) | no | MySQL-specific settings |
| `plan` | string | no | Subscription plan<br/><br/>Min length: `1`. Max length: `128`. |
| `termination-protection` | boolean | no | Service is protected against termination and powering off |
| `version` | string | no | MySQL version |

<details>
<summary>Example</summary>

```json
{
  "backup-schedule": {
    "backup-hour": 0,
    "backup-minute": 0
  },
  "binlog-retention-period": 0,
  "ip-filter": [
    "string"
  ],
  "maintenance": {
    "dow": "saturday",
    "time": "string"
  },
  "migration": {
    "dbname": "string",
    "host": "string",
    "ignore-dbs": "string",
    "method": "dump",
    "password": "string",
    "port": 0,
    "ssl": true,
    "username": "string"
  },
  "mysql-settings": {
    "connect_timeout": 0,
    "default_time_zone": "+03:00",
    "group_concat_max_len": 0,
    "information_schema_stats_expiry": 0,
    "innodb_change_buffer_max_size": 0,
    "innodb_flush_neighbors": 0,
    "innodb_ft_min_token_size": 0,
    "innodb_ft_server_stopword_table": "db_name/table_name",
    "innodb_lock_wait_timeout": 0,
    "innodb_log_buffer_size": 0,
    "innodb_online_alter_log_max_size": 0,
    "innodb_print_all_deadlocks": true,
    "innodb_read_io_threads": 0,
    "innodb_rollback_on_timeout": true,
    "innodb_thread_concurrency": 0,
    "innodb_write_io_threads": 0,
    "interactive_timeout": 0,
    "internal_tmp_mem_storage_engine": "TempTable",
    "log_output": "INSIGHTS",
    "long_query_time": 0,
    "max_allowed_packet": 0,
    "max_heap_table_size": 0,
    "net_buffer_length": 0,
    "net_read_timeout": 0,
    "net_write_timeout": 0,
    "slow_query_log": true,
    "sort_buffer_size": 0,
    "sql_mode": "ANSI,TRADITIONAL",
    "sql_require_primary_key": true,
    "tmp_table_size": 0,
    "wait_timeout": 0
  },
  "plan": "string",
  "termination-protection": true,
  "version": "string"
}
```
</details>


### Backup Schedule {#backup-schedule}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `backup-hour` | integer | no | The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.<br/><br/>Min: `0`. Max: `23`. |
| `backup-minute` | integer | no | The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.<br/><br/>Min: `0`. Max: `59`. |

### Maintenance {#maintenance}

Automatic maintenance settings

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `dow` | string | **yes** | Day of week for installing updates<br/><br/>Allowed values: `saturday`, `tuesday`, `never`, `wednesday`, `sunday`, `friday`, `monday`, `thursday`. |
| `time` | string | **yes** | Time for installing updates, UTC<br/><br/>Min length: `8`. Max length: `8`. |

### Migration {#migration}

Migrate data from existing server

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `host` | string | **yes** | Hostname or IP address of the server where to migrate data from<br/><br/>Min length: `1`. Max length: `255`. |
| `port` | integer | **yes** | Port number of the server where to migrate data from<br/><br/>Min: `1`. Max: `65535`. |
| `dbname` | string | no | Database name for bootstrapping the initial connection<br/><br/>Min length: `1`. Max length: `63`. |
| `ignore-dbs` | string | no | Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)<br/><br/>Min length: `1`. Max length: `2048`. |
| `method` | string | no | The migration method to be used<br/><br/>Allowed values: `dump`, `replication`. |
| `password` | string | no | Password for authentication with the server where to migrate data from<br/><br/>Min length: `1`. Max length: `255`. |
| `ssl` | boolean | no | The server where to migrate data from is secured with SSL |
| `username` | string | no | User name for authentication with the server where to migrate data from<br/><br/>Min length: `1`. Max length: `255`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `update-dbaas-service-mysql`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.UpdateDBAASServiceMysql) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.update_dbaas_service_mysql) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#updateDbaasServiceMysql(java.lang.String,com.exoscale.sdk.model.UpdateDbaasServiceMysqlRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api update-dbaas-service-mysql`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-dbaas-service-mysql

Delete a MySQL service

```
DELETE /dbaas-mysql/{name}
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` |  |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-dbaas-service-mysql`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteDBAASServiceMysql) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_dbaas_service_mysql) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteDbaasServiceMysql(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-dbaas-service-mysql`


---

## Other Operations

## <span data-label="PUT" class="pill-PUT"></span>start-dbaas-mysql-maintenance

Initiate MySQL maintenance update

```
PUT /dbaas-mysql/{name}/maintenance/start
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` | Min length: `0`. Max length: `63`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `start-dbaas-mysql-maintenance`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.StartDBAASMysqlMaintenance) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.start_dbaas_mysql_maintenance) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#startDbaasMysqlMaintenance(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api start-dbaas-mysql-maintenance`

## <span data-label="POST" class="pill-POST"></span>stop-dbaas-mysql-migration

Stop a DBaaS MySQL migration

```
POST /dbaas-mysql/{name}/migration/stop
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` | Min length: `0`. Max length: `63`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `stop-dbaas-mysql-migration`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.StopDBAASMysqlMigration) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.stop_dbaas_mysql_migration) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#stopDbaasMysqlMigration(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api stop-dbaas-mysql-migration`

## <span data-label="PUT" class="pill-PUT"></span>enable-dbaas-mysql-writes

Temporarily enable writes for MySQL services in read-only mode due to filled up storage

```
PUT /dbaas-mysql/{name}/enable/writes
```

null

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `name` | `path` | Min length: `0`. Max length: `63`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `enable-dbaas-mysql-writes`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.EnableDBAASMysqlWrites) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.enable_dbaas_mysql_writes) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#enableDbaasMysqlWrites(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api enable-dbaas-mysql-writes`

## <span data-label="GET" class="pill-GET"></span>get-dbaas-settings-mysql

Get DBaaS MySQL settings

```
GET /dbaas-settings-mysql
```

Get DBaaS MySQL settings

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `settings` | [Settings](#settings) |  |

<details>
<summary>Example output</summary>

```json
{
  "settings": {
    "mysql": {
      "additionalProperties": true,
      "properties": {},
      "title": "string",
      "type": "string"
    }
  }
}
```
</details>


### Settings {#settings}

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `mysql` | [Mysql](#mysql) | no | mysql.conf configuration values |

### Mysql {#mysql}

mysql.conf configuration values

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `additionalProperties` | boolean | no |  |
| `properties` | object | no |  |
| `title` | string | no |  |
| `type` | string | no |  |

SDK reference for `get-dbaas-settings-mysql`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetDBAASSettingsMysql) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_dbaas_settings_mysql) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getDbaasSettingsMysql())

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api get-dbaas-settings-mysql`


