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
pid_file Location to store the PID file 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
client_ssl_cipher Which ciphers are allowed between client and MySQL Router, defaults to a secure list of SSL ciphers String
client_ssl_curves Which curves are allowed between the client and MySQL Router, defaults to a secure list of SSL curves String
client_ssl_dh_params Filename of the a DH parameter file, is not set by default String
client_ssl_mode Controls if connections from the client to MySQL Router must be encrypted, defaults to PREFERRED if not set String
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_state 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
net_buffer_length Set net_buffer_length Integer
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
server_ssl_cipher SSL Cipher for Server String
server_ssl_curves SSL Curves for Server String
server_ssl_mode SSL Mode for Server String
server_ssl_verify SSL Verify for Server String
socket Path to Unix domain socket file String

Metadata Cache Options

Table 4.9 [metadata_cache]

Option Name Description Type
auth_cache_refresh_interval Time between auth-cache refresh attempts Numeric
auth_cache_ttl Time until the cache becomes invalid if not refreshed Numeric
bootstrap_server_addresses MySQL servers with metadata, as a comma-separated list String
cluster_type Object Router was bootstrapped against 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
destination Name of device to log to; optionally used with [consolelog] String
filename Log file name; optionally used with [logger] and [filelog] String
level Logging level String
timestamp_precision Logger timestamp precision String

HTTP Server Options

Table 4.11 [http_server]

Option Name Description Type
bind_address IP 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

Table 4.14 [io]

Option Name Description Type
backend The IO backend String
threads The IO thread count Numeric

MySQL Router Configuration File Option Descriptions