operationId: databases_update_sql_mode
summary: Update SQL Mode for a Cluster
description: >-
To configure the SQL modes for an existing MySQL cluster, send a PUT
request to `/v2/databases/$DATABASE_ID/sql_mode` specifying the desired
modes. See the official MySQL 8 documentation for a [full list of supported
SQL modes](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-full).
A successful request will receive a 204 No Content status code with no body
in response.
tags:
- Databases
parameters:
- $ref: 'parameters.yml#/database_cluster_uuid'
requestBody:
required: true
content:
application/json:
schema:
$ref: 'models/sql_mode.yml'
example:
sql_mode: 'ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE'
responses:
'204':
$ref: '../../shared/responses/no_content.yml'
'401':
$ref: '../../shared/responses/unauthorized.yml'
'404':
$ref: '../../shared/responses/not_found.yml'
'429':
$ref: '../../shared/responses/too_many_requests.yml'
'500':
$ref: '../../shared/responses/server_error.yml'
default:
$ref: '../../shared/responses/unexpected_error.yml'
x-codeSamples:
- $ref: 'examples/curl/databases_update_sql_mode.yml'
- $ref: 'examples/go/databases_update_sql_mode.yml'
- $ref: 'examples/python/databases_update_sql_mode.yml'
security:
- bearer_auth:
- 'database:update'