Reference

Specific options for MySQL

You can find all the specific options for MySQL by using the CLI help:

exo dbaas create --help-mysql
  --mysql-admin-password         custom password for admin user
  --mysql-admin-username         custom username for admin user
  --mysql-backup-schedule        automated backup schedule (format: HH:MM)
  --mysql-fork-from              name of a Database Service to fork from
  --mysql-ip-filter              allow incoming connections from CIDR address block
  --mysql-recovery-backup-time   the timestamp of the backup to restore when forking from a Database Service
  --mysql-settings               MySQL configuration settings (JSON format)
  --mysql-version                MySQL major version

Managing JSON configuration settings

You can list all settings available for the database service by using the command:

exo dbaas type show mysql --settings mysql

┼──────────────────────────────────┼───────────────┼──────────────────────────────────────────────────────┼
│               KEY                │     TYPE      │                     DESCRIPTION                      │
┼──────────────────────────────────┼───────────────┼──────────────────────────────────────────────────────┼
│ 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.            │
│                                  │               │   * Example: ANSI,TRADITIONAL                        │
│ interactive_timeout              │ integer       │ The number of seconds the server waits for           │
│                                  │               │ activity on an interactive connection before         │
│                                  │               │ closing it.                                          │
│                                  │               │   * Minimum: 30 / Maximum: 604800                    │
│                                  │               │   * Example: 3600                                    │
│ max_allowed_packet               │ integer       │ Size of the largest message in bytes that can be     │
│                                  │               │ received by the server. Default is 67108864 (64M)    │
│                                  │               │   * Minimum: 102400 / Maximum: 1.073741824e+09       │
│                                  │               │   * Example: 6.7108864e+07                           │
│ group_concat_max_len             │ integer       │ The maximum permitted result length in bytes for     │
│                                  │               │ the GROUP_CONCAT() function.                         │
│                                  │               │   * Minimum: 4 / Maximum: 1.8446744073709552e+19     │
│                                  │               │   * Example: 1024                                    │
│ innodb_print_all_deadlocks       │ boolean       │ When enabled, information about all deadlocks in     │
│                                  │               │ InnoDB user transactions is recorded in the error    │
│                                  │               │ log. Disabled by default.                            │
│                                  │               │   * Example: true                                    │
│ 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: 65536 / Maximum: 1.099511627776e+12     │
│                                  │               │   * Example: 1.34217728e+08                          │
│ max_heap_table_size              │ integer       │ Limits the size of internal in-memory tables. Also   │
│                                  │               │ set tmp_table_size. Default is 16777216 (16M)        │
│                                  │               │   * Minimum: 1.048576e+06 / Maximum: 1.073741824e+09 │
│                                  │               │   * Example: 1.6777216e+07                           │
│ 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.            │
│                                  │               │   * Example: +03:00                                  │
│ innodb_ft_min_token_size         │ integer       │ Minimum length of words that are stored in an        │
│                                  │               │ InnoDB FULLTEXT index.                               │
│                                  │               │   * Minimum: 0 / Maximum: 16                         │
│                                  │               │   * Example: 3                                       │
│ net_read_timeout                 │ integer       │ The number of seconds to wait for more data from a   │
│                                  │               │ connection before aborting the read.                 │
│                                  │               │   * Minimum: 1 / Maximum: 3600                       │
│                                  │               │   * Example: 30                                      │
│ innodb_rollback_on_timeout       │ boolean       │ When enabled a transaction timeout causes InnoDB     │
│                                  │               │ to abort and roll back the entire transaction.       │
│                                  │               │   * Example: true                                    │
│ sort_buffer_size                 │ integer       │ Sort buffer size in bytes for ORDER BY               │
│                                  │               │ optimization. Default is 262144 (256K)               │
│                                  │               │   * Minimum: 32768 / Maximum: 1.073741824e+09        │
│                                  │               │   * Example: 262144                                  │
│ tmp_table_size                   │ integer       │ Limits the size of internal in-memory tables. Also   │
│                                  │               │ set max_heap_table_size. Default is 16777216 (16M)   │
│                                  │               │   * Minimum: 1.048576e+06 / Maximum: 1.073741824e+09 │
│                                  │               │   * Example: 1.6777216e+07                           │
│ wait_timeout                     │ integer       │ The number of seconds the server waits for           │
│                                  │               │ activity on a noninteractive connection before       │
│                                  │               │ closing it.                                          │
│                                  │               │   * Minimum: 1 / Maximum: 2.147483e+06               │
│                                  │               │   * Example: 28800                                   │
│ innodb_log_buffer_size           │ integer       │ The size in bytes of the buffer that InnoDB uses     │
│                                  │               │ to write to the log files on disk.                   │
│                                  │               │   * Minimum: 1.048576e+06 / Maximum: 4.294967295e+09 │
│                                  │               │   * Example: 1.6777216e+07                           │
│ net_write_timeout                │ integer       │ The number of seconds to wait for a block to be      │
│                                  │               │ written to a connection before aborting the write.   │
│                                  │               │   * Minimum: 1 / Maximum: 3600                       │
│                                  │               │   * Example: 30                                      │
│ internal_tmp_mem_storage_engine  │ string        │ The storage engine for in-memory internal            │
│                                  │               │ temporary tables.                                    │
│                                  │               │   * Supported values:                                │
│                                  │               │     - TempTable                                      │
│                                  │               │     - MEMORY                                         │
│                                  │               │   * Example: TempTable                               │
│ information_schema_stats_expiry  │ integer       │ The time, in seconds, before cached statistics       │
│                                  │               │ expire                                               │
│                                  │               │   * Minimum: 900 / Maximum: 3.1536e+07               │
│                                  │               │   * Example: 86400                                   │
│ innodb_ft_server_stopword_table  │ [null string] │ This option is used to specify your own InnoDB       │
│                                  │               │ FULLTEXT index stopword list for all InnoDB          │
│                                  │               │ tables.                                              │
│                                  │               │   * Example: db_name/table_name                      │
│ 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.            │
│                                  │               │   * Example: true                                    │
│ 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: 0 / Maximum: 3600                       │
│                                  │               │   * Example: 10                                      │
│ 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                 │
│                                  │               │   * Example: true                                    │
│ connect_timeout                  │ integer       │ The number of seconds that the mysqld server waits   │
│                                  │               │ for a connect packet before responding with Bad      │
│                                  │               │ handshake                                            │
│                                  │               │   * Minimum: 2 / Maximum: 3600                       │
│                                  │               │   * Example: 10                                      │
│ innodb_lock_wait_timeout         │ integer       │ The length of time in seconds an InnoDB              │
│                                  │               │ transaction waits for a row lock before giving up.   │
│                                  │               │   * Minimum: 1 / Maximum: 3600                       │
│                                  │               │   * Example: 50                                      │
┼──────────────────────────────────┼───────────────┼──────────────────────────────────────────────────────┼

You can also update the settings of your database service:

exo dbaas update --zone de-fra-1 target-mysql-service-name --mysql-settings '{"max_allowed_packet":1073741824}'

NOTE - The parameter of --mysql-settings has to be in JSON format.