godo.Databases.UpdateMySQLConfig()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Databases.UpdateMySQLConfig(ctx context.Context, databaseID string, config *godo.MySQLConfig) (*godo.Response, error)

Description

UpdateMySQLConfig updates the config for a MySQL database cluster.

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

Parameters

databaseID string required
config *godo.MySQLConfig required

Fields of godo.MySQLConfig

MySQLConfig holds advanced configurations for MySQL database clusters.

ConnectTimeout *int

Omitted from JSON when empty. JSON key: connect_timeout

DefaultTimeZone *string

Omitted from JSON when empty. JSON key: default_time_zone

InnodbLogBufferSize *int

Omitted from JSON when empty. JSON key: innodb_log_buffer_size

InnodbOnlineAlterLogMaxSize *int

Omitted from JSON when empty. JSON key: innodb_online_alter_log_max_size

InnodbLockWaitTimeout *int

Omitted from JSON when empty. JSON key: innodb_lock_wait_timeout

InteractiveTimeout *int

Omitted from JSON when empty. JSON key: interactive_timeout

MaxAllowedPacket *int

Omitted from JSON when empty. JSON key: max_allowed_packet

NetReadTimeout *int

Omitted from JSON when empty. JSON key: net_read_timeout

SortBufferSize *int

Omitted from JSON when empty. JSON key: sort_buffer_size

SQLMode *string

Omitted from JSON when empty. JSON key: sql_mode

SQLRequirePrimaryKey *bool

Omitted from JSON when empty. JSON key: sql_require_primary_key

WaitTimeout *int

Omitted from JSON when empty. JSON key: wait_timeout

NetWriteTimeout *int

Omitted from JSON when empty. JSON key: net_write_timeout

GroupConcatMaxLen *int

Omitted from JSON when empty. JSON key: group_concat_max_len

InformationSchemaStatsExpiry *int

Omitted from JSON when empty. JSON key: information_schema_stats_expiry

InnodbFtMinTokenSize *int

Omitted from JSON when empty. JSON key: innodb_ft_min_token_size

InnodbFtServerStopwordTable *string

Omitted from JSON when empty. JSON key: innodb_ft_server_stopword_table

InnodbPrintAllDeadlocks *bool

Omitted from JSON when empty. JSON key: innodb_print_all_deadlocks

InnodbRollbackOnTimeout *bool

Omitted from JSON when empty. JSON key: innodb_rollback_on_timeout

InternalTmpMemStorageEngine *string

Omitted from JSON when empty. JSON key: internal_tmp_mem_storage_engine

MaxHeapTableSize *int

Omitted from JSON when empty. JSON key: max_heap_table_size

TmpTableSize *int

Omitted from JSON when empty. JSON key: tmp_table_size

SlowQueryLog *bool

Omitted from JSON when empty. JSON key: slow_query_log

LongQueryTime *float32

Omitted from JSON when empty. JSON key: long_query_time

BackupHour *int

Omitted from JSON when empty. JSON key: backup_hour

BackupMinute *int

Omitted from JSON when empty. JSON key: backup_minute

BinlogRetentionPeriod *int

Omitted from JSON when empty. JSON key: binlog_retention_period

InnodbChangeBufferMaxSize *int

Omitted from JSON when empty. JSON key: innodb_change_buffer_max_size

InnodbFlushNeighbors *int

Omitted from JSON when empty. JSON key: innodb_flush_neighbors

InnodbReadIoThreads *int

Omitted from JSON when empty. JSON key: innodb_read_io_threads

InnodbThreadConcurrency *int

Omitted from JSON when empty. JSON key: innodb_thread_concurrency

InnodbWriteIoThreads *int

Omitted from JSON when empty. JSON key: innodb_write_io_threads

NetBufferLength *int

Omitted from JSON when empty. JSON key: net_buffer_length

LogOutput *string

Omitted from JSON when empty. JSON key: log_output

Returns

*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.Response

Response is a DigitalOcean response. This wraps the standard http.Response returned from DigitalOcean.

Response *http.Response
Links *godo.Links

Links that were returned with the response. These are parsed from
request body and not the header.

Meta *godo.Meta

Meta describes generic information about the response.

Monitor string

Monitoring URI

Rate godo.Rate

Request Sample

Show Request Sample
package main

import (
	"context"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

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

	_, err := client.Databases.UpdateMySQLConfig(ctx, "<your-database-id>", &godo.MySQLConfig{})
	if err != nil {
		log.Fatal(err)
	}
}

More Information

See PATCH /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.