MySQL Router 8.0

4.3.2 Configuration File Options

When started, MySQL Router reads a list of configuration files that together make up the configuration of the router. At least one configuration file is required.

MySQL Router reads options from configuration files that closely resemble the traditional INI file format, with sections and options. These specify the options set when MySQL Router starts. For file syntax information, see Section 4.1, “Configuration File Syntax”.

Options are defined under sections, that dictate the option's meaning. For example, user under the [DEFAULT] section refers to the system user running router, while user under the [metadata_cache] section refers to the MySQL user that accesses metadata.

The following tables are separated by section, and summarize the MySQL Router options defined in a MySQL Router configuration file. Detailed information about each of these options, such as descriptions and allowed values, is documented below these tables.

General Options

Table 4.7 [DEFAULT]

Option Name Description Type
config_folder Path to configuration files String
connect_timeout Number of seconds before connection attempts to a metadata server are considered timed out Integer
keyring_path Path to keyring file String
logging_folder Path to router logs String
master_key_path Path to master keyring file String
master-key-reader Script that returns the master key to STDOUT String
master-key-writer Script that reads the master key from STDIN String
plugin_folder Path to router plugins String
runtime_folder Path to runtime files String
sinks Logging method(s) to receive configured log data String
thread_stack_size Size in KB of memory allocated to each thread stack Integer
user System user that router is run as String

Routing Options

Table 4.8 [routing]

Option Name Description Type
bind_address Address router is bound to, also uses bind_port if a port is not defined String
bind_port Default port used by bind_address Integer
client_connect_timeout Maximum number of seconds to receive packets from MySQL server Integer
connect_timeout Number of seconds before connection attempts to a MySQL server are considered timed out Integer
destinations Routing destinations as either a comma-separated list of MySQL servers, or a metadata-cache definition String
dynamic_config Path to generated JSON file used to track and store active MySQL InnoDB cluster Metadata server addresses String
max_connect_errors Maximum number of failed MySQL server connections before giving up Integer
max_connections Maximum number of connections assigned to a routed destination MySQL server Integer
mode Routing mode, how router chooses destination MySQL servers String
protocol Protocol for connecting to MySQL Server String
read_timeout Number of seconds before read operations to a metadata server are considered timed out Integer
routing_strategy Routing strategy (optional), how router chooses destination MySQL servers String
socket Path to Unix domain socket file String

Metadata Cache Options

Table 4.9 [metadata_cache]

Option Name Description Type
bootstrap_server_addresses MySQL servers with metadata, as a comma-separated list String
metadata_cluster InnoDB cluster name String
router_id Router ID Integer
ssl_mode SSL connection mode for connecting to the metadata server, defaults to PREFERRED if not set String
ttl Time To Live, in seconds Integer
use_gr_notifications Group Replication notifications behavior Integer
user MySQL user that accesses the MySQL Server's metadata schema String

Logging Options

Table 4.10 [logger]

Option Name Description Type
level Logging level String

HTTP Server Options

Table 4.11 [http_server]

Option Name Description Type
bind_address IPv4 address bound to the HTTP port String
port HTTP server TCP port Integer
require_realm [http_auth_realm] name String
ssl_cert SSL certification file name String
ssl_cipher Approved SSL ciphers String
ssl_dh_param DH parameter file name String
ssl Enables TLSv1.2 or later support Integer
ssl_key SSL key filename String
static_folder Directory for HTTP server static file requests String

Table 4.12 [http_auth_realm]

Option Name Description Type
backend Name of the [http_auth_backend] section String
method The HTTP authentication method String
name Realm name for authenticated user String
require Require authentication validation String

Table 4.13 [http_auth_backend]

Option Name Description Type
backend Backend type String
filename Backend storage file name String

MySQL Router Configuration File Option Descriptions