---
title: "Change database settings"
method: PATCH
path: "/v1/databases/{databaseID}/settings"
tags: ["Configuration"]
---

# Change database settings

`PATCH /v1/databases/{databaseID}/settings`

## Request

- Base URL: `https://api.liara.ir`
- URL: `https://api.liara.ir/v1/databases/{databaseID}/settings`
- Auth: HTTP bearer

Changes engine settings for `mysql`, `mariadb` and `postgres` databases. Changing parameters (anything except the `postgis` and `pgvector` extensions) needs a bundle plan that allows it. Settings you send are merged with the current ones; send `null` to go back to the default. Team permission: `manage`.

## Path parameters

- `databaseID` string, required: 24-character hexadecimal ID.

## Query parameters

- `teamID` string: 24-character hexadecimal ID.

## Request body

- object
  - `type` 'mysql' | 'mariadb' | 'postgres', required: Must match the database's type.
  - `options` union
    - MySQLSettings
      - `maxConnections` number, nullable
      - `netBufferLength` number, nullable
      - `maxAllowedPacket` number, nullable
      - `connectTimeout` number, nullable
      - `maxJoinSize` number, nullable
      - `eventScheduler` 'ON' | 'OFF'
    - PostgresSettings
      - `connectTimeout` number, nullable
      - `clientEncoding` string, nullable
      - `maxConnections` number, nullable
      - `sharedBuffers` number, nullable
      - `postgis` boolean
      - `pgvector` boolean

## Response `200`

The settings were saved. The response body is empty.

## Other responses

- `400`: The body, the database ID or `teamID` is invalid, or the PostgreSQL version is unknown.
- `401`: The API token is missing, invalid or expired.
- `403`: The PostgreSQL version is deprecated (only extension changes are allowed), or, with `teamID`, you aren't a member (`team_not_found`) or lack the permission (`no_permission`).
- `404`: No database of this type with this ID, or it's frozen.
- `428`: Your bundle plan doesn't allow changing parameters.

---

[API](https://skmtc.dev/liara-cloud/apis/dbaas.md) - [All operations](https://skmtc.dev/liara-cloud/apis/dbaas/llms.txt) - [OpenAPI document](https://skmtc.dev/liara-cloud/apis/dbaas/revisions/f6f78c6f05c6?raw)
