Create a DBaaS MySQL service

POST /dbaas-mysql/{name}

Create a DBaaS MySQL service

Path parameters

  • name string Required

    Minimum length is 0, maximum length is 63.

application/json

Body Required

  • backup-schedule object
    Hide backup-schedule attributes Show backup-schedule attributes object
    • backup-hour integer(int64)

      The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.

      Minimum value is 0, maximum value is 23.

    • backup-minute integer(int64)

      The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.

      Minimum value is 0, maximum value is 59.

  • integrations array[object]

    Service integrations to be enabled when creating the service.

    Hide integrations attributes Show integrations attributes object
    • type string Required

      Integration type

      Value is read_replica.

    • source-service string

      Minimum length is 0, maximum length is 63.

    • dest-service string

      Minimum length is 0, maximum length is 63.

    • settings object

      Integration settings

  • ip-filter array[string]

    Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'

  • termination-protection boolean

    Service is protected against termination and powering off

  • fork-from-service string

    Minimum length is 0, maximum length is 63.

  • recovery-backup-time string

    ISO time of a backup to recover from for services that support arbitrary times

    Minimum length is 1.

  • mysql-settings object

    Additional properties are NOT allowed.

    Hide mysql-settings attributes Show mysql-settings attributes object
    • net_write_timeout integer

      The number of seconds to wait for a block to be written to a connection before aborting the write.

      Minimum value is 1, maximum value is 3600.

    • internal_tmp_mem_storage_engine string

      The storage engine for in-memory internal temporary tables.

      Values are TempTable or MEMORY.

    • sql_mode string

      Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned.

      Maximum length is 1024. Format should match the following pattern: ^[A-Z_]*(,[A-Z_]+)*$.

    • information_schema_stats_expiry integer

      The time, in seconds, before cached statistics expire

      Minimum value is 900, maximum value is 31536000.

    • sort_buffer_size integer

      Sort buffer size in bytes for ORDER BY optimization. Default is 262144 (256K)

      Minimum value is 32768, maximum value is 1073741824.

    • innodb_thread_concurrency integer

      Defines the maximum number of threads permitted inside of InnoDB. Default is 0 (infinite concurrency - no limit)

      Minimum value is 0, maximum value is 1000.

    • innodb_write_io_threads integer

      The number of I/O threads for write operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.

      Minimum value is 1, maximum value is 64.

    • innodb_ft_min_token_size integer

      Minimum length of words that are stored in an InnoDB FULLTEXT index. Changing this parameter will lead to a restart of the MySQL service.

      Minimum value is 0, maximum value is 16.

    • innodb_change_buffer_max_size integer

      Maximum size for the InnoDB change buffer, as a percentage of the total size of the buffer pool. Default is 25

      Minimum value is 0, maximum value is 50.

    • innodb_flush_neighbors integer

      Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent (default is 1): 0 - dirty pages in the same extent are not flushed, 1 - flush contiguous dirty pages in the same extent, 2 - flush dirty pages in the same extent

      Minimum value is 0, maximum value is 2.

    • tmp_table_size integer

      Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M)

      Minimum value is 1048576, maximum value is 1073741824.

    • slow_query_log boolean

      Slow query log enables capturing of slow queries. Setting slow_query_log to false also truncates the mysql.slow_log table. Default is off

    • connect_timeout integer

      The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake

      Minimum value is 2, maximum value is 3600.

    • log_output string

      The slow log output destination when slow_query_log is ON. To enable MySQL AI Insights, choose INSIGHTS. To use MySQL AI Insights and the mysql.slow_log table at the same time, choose INSIGHTS,TABLE. To only use the mysql.slow_log table, choose TABLE. To silence slow logs, choose NONE.

      Values are INSIGHTS, INSIGHTS,TABLE, NONE, or TABLE.

    • net_read_timeout integer

      The number of seconds to wait for more data from a connection before aborting the read.

      Minimum value is 1, maximum value is 3600.

    • innodb_lock_wait_timeout integer

      The length of time in seconds an InnoDB transaction waits for a row lock before giving up. Default is 120.

      Minimum value is 1, maximum value is 3600.

    • wait_timeout integer

      The number of seconds the server waits for activity on a noninteractive connection before closing it.

      Minimum value is 1, maximum value is 2147483.

    • innodb_rollback_on_timeout boolean

      When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction. Changing this parameter will lead to a restart of the MySQL service.

    • group_concat_max_len integer

      The maximum permitted result length in bytes for the GROUP_CONCAT() function.

      Minimum value is 4, maximum value is 18446744073709551615.

    • net_buffer_length integer

      Start sizes of connection buffer and result buffer. Default is 16384 (16K). Changing this parameter will lead to a restart of the MySQL service.

      Minimum value is 1024, maximum value is 1048576.

    • innodb_print_all_deadlocks boolean

      When enabled, information about all deadlocks in InnoDB user transactions is recorded in the error log. Disabled by default.

    • innodb_online_alter_log_max_size integer

      The upper limit in bytes on the size of the temporary log files used during online DDL operations for InnoDB tables.

      Minimum value is 65536, maximum value is 1099511627776.

    • interactive_timeout integer

      The number of seconds the server waits for activity on an interactive connection before closing it.

      Minimum value is 30, maximum value is 604800.

    • innodb_log_buffer_size integer

      The size in bytes of the buffer that InnoDB uses to write to the log files on disk.

      Minimum value is 1048576, maximum value is 4294967295.

    • max_allowed_packet integer

      Size of the largest message in bytes that can be received by the server. Default is 67108864 (64M)

      Minimum value is 102400, maximum value is 1073741824.

    • max_heap_table_size integer

      Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

      Minimum value is 1048576, maximum value is 1073741824.

    • innodb_ft_server_stopword_table string | null

      This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables.

      Maximum length is 1024. Format should match the following pattern: ^.+/.+$.

    • innodb_read_io_threads integer

      The number of I/O threads for read operations in InnoDB. Default is 4. Changing this parameter will lead to a restart of the MySQL service.

      Minimum value is 1, maximum value is 64.

    • sql_require_primary_key boolean

      Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them.

    • default_time_zone string

      Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or 'SYSTEM' to use the MySQL server default.

      Minimum length is 2, maximum length is 100. Format should match the following pattern: ^([-+][\d:]*|[\w/]*)$.

    • long_query_time number

      The slow_query_logs work as SQL statements that take more than long_query_time seconds to execute. Default is 10s

      Minimum value is 0.0, maximum value is 3600.

  • maintenance object

    Automatic maintenance settings

    Hide maintenance attributes Show maintenance attributes object
    • dow string Required

      Day of week for installing updates

      Values are saturday, tuesday, never, wednesday, sunday, friday, monday, or thursday.

    • time string Required

      Time for installing updates, UTC

      Minimum length is 8, maximum length is 8.

  • admin-username string

    Custom username for admin user. This must be set only when a new service is being created.

    Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$.

  • version string

    MySQL major version

    Minimum length is 1.

  • plan string Required

    Subscription plan

    Minimum length is 1, maximum length is 128.

  • admin-password string

    Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

    Minimum length is 8, maximum length is 256. Format should match the following pattern: ^[a-zA-Z0-9-_]+$.

  • migration object

    Migrate data from existing server

    Hide migration attributes Show migration attributes object
    • host string Required

      Hostname or IP address of the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • port integer(int64) Required

      Port number of the server where to migrate data from

      Minimum value is 1, maximum value is 65535.

    • password string

      Password for authentication with the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • ssl boolean

      The server where to migrate data from is secured with SSL

    • username string

      User name for authentication with the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • dbname string

      Database name for bootstrapping the initial connection

      Minimum length is 1, maximum length is 63.

    • ignore-dbs string

      Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)

      Minimum length is 1, maximum length is 2048.

    • method string

      Values are dump or replication.

  • binlog-retention-period integer(int64)

    The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.

    Minimum value is 600, maximum value is 86400.

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • reference object

      Related resource reference

      Hide reference attributes Show reference attributes object
      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

POST /dbaas-mysql/{name}
curl \
 --request POST 'https://api-ch-gva-2.exoscale.com/v2/dbaas-mysql/{name}' \
 --header "Content-Type: application/json" \
 --data '{"backup-schedule":{"backup-hour":42,"backup-minute":42},"integrations":[{"type":"read_replica","source-service":"string","dest-service":"string","settings":{}}],"ip-filter":["string"],"termination-protection":true,"fork-from-service":"string","recovery-backup-time":"string","mysql-settings":{"net_write_timeout":30,"internal_tmp_mem_storage_engine":"TempTable","sql_mode":"ANSI,TRADITIONAL","information_schema_stats_expiry":86400,"sort_buffer_size":262144,"innodb_thread_concurrency":10,"innodb_write_io_threads":10,"innodb_ft_min_token_size":3,"innodb_change_buffer_max_size":30,"innodb_flush_neighbors":0,"tmp_table_size":16777216,"slow_query_log":true,"connect_timeout":10,"log_output":"INSIGHTS","net_read_timeout":30,"innodb_lock_wait_timeout":50,"wait_timeout":28800,"innodb_rollback_on_timeout":true,"group_concat_max_len":1024,"net_buffer_length":16384,"innodb_print_all_deadlocks":true,"innodb_online_alter_log_max_size":134217728,"interactive_timeout":3600,"innodb_log_buffer_size":16777216,"max_allowed_packet":67108864,"max_heap_table_size":16777216,"innodb_ft_server_stopword_table":"db_name/table_name","innodb_read_io_threads":10,"sql_require_primary_key":true,"default_time_zone":"+03:00","long_query_time":10},"maintenance":{"dow":"saturday","time":"string"},"admin-username":"string","version":"string","plan":"string","admin-password":"string","migration":{"host":"string","port":42,"password":"string","ssl":true,"username":"string","dbname":"string","ignore-dbs":"string","method":"dump"},"binlog-retention-period":42}'
Request examples
{
  "backup-schedule": {
    "backup-hour": 42,
    "backup-minute": 42
  },
  "integrations": [
    {
      "type": "read_replica",
      "source-service": "string",
      "dest-service": "string",
      "settings": {}
    }
  ],
  "ip-filter": [
    "string"
  ],
  "termination-protection": true,
  "fork-from-service": "string",
  "recovery-backup-time": "string",
  "mysql-settings": {
    "net_write_timeout": 30,
    "internal_tmp_mem_storage_engine": "TempTable",
    "sql_mode": "ANSI,TRADITIONAL",
    "information_schema_stats_expiry": 86400,
    "sort_buffer_size": 262144,
    "innodb_thread_concurrency": 10,
    "innodb_write_io_threads": 10,
    "innodb_ft_min_token_size": 3,
    "innodb_change_buffer_max_size": 30,
    "innodb_flush_neighbors": 0,
    "tmp_table_size": 16777216,
    "slow_query_log": true,
    "connect_timeout": 10,
    "log_output": "INSIGHTS",
    "net_read_timeout": 30,
    "innodb_lock_wait_timeout": 50,
    "wait_timeout": 28800,
    "innodb_rollback_on_timeout": true,
    "group_concat_max_len": 1024,
    "net_buffer_length": 16384,
    "innodb_print_all_deadlocks": true,
    "innodb_online_alter_log_max_size": 134217728,
    "interactive_timeout": 3600,
    "innodb_log_buffer_size": 16777216,
    "max_allowed_packet": 67108864,
    "max_heap_table_size": 16777216,
    "innodb_ft_server_stopword_table": "db_name/table_name",
    "innodb_read_io_threads": 10,
    "sql_require_primary_key": true,
    "default_time_zone": "+03:00",
    "long_query_time": 10
  },
  "maintenance": {
    "dow": "saturday",
    "time": "string"
  },
  "admin-username": "string",
  "version": "string",
  "plan": "string",
  "admin-password": "string",
  "migration": {
    "host": "string",
    "port": 42,
    "password": "string",
    "ssl": true,
    "username": "string",
    "dbname": "string",
    "ignore-dbs": "string",
    "method": "dump"
  },
  "binlog-retention-period": 42
}
Response examples (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}