v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Databases

Update SQL Mode for a Cluster

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. A successful request will receive a 204 No Content status code with no body in response.

put/v2/databases/{database_cluster_uuid}/sql_mode

Path parameters

database_cluster_uuidstring uuid required

A unique identifier for a database cluster.

Request body

sql_modestring required

A string specifying the configured SQL modes for the MySQL cluster.

Example request

{
  "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES"
}

Response

The action was successful and the response body is empty.