godo.Databases.GetAdvancedMySQLConfig()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Databases.GetAdvancedMySQLConfig(ctx context.Context, databaseID string) (*godo.AdvancedMySQLConfig, *godo.Response, error)

Description

GetAdvancedMySQLConfig retrieves the config for an advanced_mysql database cluster.

This method sends a GET request to /v2/databases/{}/config.

Parameters

databaseID string required

Returns

*godo.AdvancedMySQLConfig
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.AdvancedMySQLConfig

AdvancedMySQLConfig holds advanced configurations for advanced_mysql database clusters.

MySQLParameters []godo.AdvancedMySQLParameter

Omitted from JSON when empty. JSON key: mysql_parameters

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.Databases.GetAdvancedMySQLConfig(ctx, "<your-database-id>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "config": {
    "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES",
    "sql_require_primary_key": true
  }
}

More Information

See GET /v2/databases/{}/config in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.