Specific options when creating or updating a Mysql service

You can find all the specific options for Mysql by using the CLI help as such:

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

Restricting connections from the Internet

By default, Exoscale DBaaS are accessible from 0.0.0.0/0 which is the whole Internet. Data does not transmit in clear over the network as it is SSL encrypted by default and authenticated.

To restrict the incoming connection to your database service, you can add a filter allowing:

  • just one IP address
  • a network range
  • a combination of the above

To do this update your service or create it with the ip filter which is a comma separated list of CIDRs exo dbaas update -z de-muc-1 test-mysql --mysql-ip-filter=a.b.c.d/32,w,x,y,z/24

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                                      │
┼──────────────────────────────────┼───────────────┼──────────────────────────────────────────────────────┼

Refer to the equivalent section for Managed PostgreSQL