MySQL Router 8.0

4.3.1.1 mysqlrouter — Command Line Options

MySQL Router accepts command line options that are passed into mysqlrouter to affect its behavior, or to bootstrap router based on an InnoDB cluster.

When starting Router, you can optionally use --config to pass in the main configuration file's location (otherwise the default location is used) and --extra-config for an additional configuration file.

Bootstrapping command line options affect the generated files and directories that are used when starting MySQL Router.

mysqlrouter Option Summaries

Table 4.2 General Options

Option Name Description
--config Read configuration options from the provided file.
--extra-config Read this file after configuration files are read from either default locations or from files specified by the --config option.
--help Display help text and exit.
--user Run mysqlrouter as the user having the defined user name or numeric user id.
--version Display version information and exit.

Table 4.3 Bootstrapping Options

Option Name Description Introduced
--account The MySQL user account used by Router after boostrapping 8.0.18
--account-create Bootstrapped account creation behavior 8.0.18
--account-host The host pattern used for bootstrapped accounts 8.0.12
--bootstrap Bootstrap and configure Router for operation with a MySQL InnoDB cluster.
--bootstrap-socket Connect to the MySQL metadata server through a Unix domain socket, used in conjunction with --bootstrap.
--conf-base-port Base port to use for listening Router ports.
--conf-bind-address IP address of the interface to which router's listening sockets should bind.
--conf-skip-tcp Whether to disable binding of a TCP port for incoming connections.
--conf-use-gr-notifications Enables Group Replication notifications 8.0.17
--conf-use-sockets Whether to use Unix domain sockets.
--connect-timeout Number of seconds before connection attempts to a metadata server are considered timed out 8.0.4
--directory Creates a self-contained directory for a new instance of the Router.
--force Force reconfiguration of a possibly existing instance of the router.
--force-password-validation When creating a user account automatically, do not skip the validate_password mechanism.
--master-key-reader Script that returns the master key to STDOUT. 8.0.12
--master-key-writer Script that reads the master key from STDIN. 8.0.12
--name Gives a symbolic name for the router instance.
--password-retries The number of retries to use for generating the Router's user password.
--read-timeout Number of seconds before read operations to a metadata server are considered timed out 8.0.4
--report-host Router's hostname; overrides auto-detection 8.0.12
--strict Enables bootstrap strict mode 8.0.18

Table 4.4 SSL Options

Option Name Description Introduced
--ssl-ca Path to SSL Certificate Authority file to verify server's certificate against.
--ssl-capath Directory that contains trusted SSL Certificate Authority certificate files
--ssl-cert The client-side SSL certificate to facilitate client-side authentication during bootstrap 8.0.4
--ssl-cipher A colon-separated list of SSL ciphers to allow, if SSL is enabled.
--ssl-crl Path to SSL CRL file to use when verifying server certificate.
--ssl-crlpath Path to directory containing SSL CRL files to use when verifying server certificate.
--ssl-key The private SSL key to facilitate client-side authentication during bootstrap 8.0.4
--ssl-mode Desired security state when connecting to the metadata server during bootstrap and normal operation. Analogous to --ssl-mode in mysql client.
--tls-version Comma-separated list of TLS versions to request, if SSL is enabled.

Table 4.5 Windows Services Options

Option Name Description
--clear-all-credentials Clear all stored credentials
--install-service Install MySQL Router as service named MySQLRouter, set it to automatically start when Windows restarts (Windows only)
--install-service-manual Install MySQL Router as service named MySQLRouter that can be manually started (Windows only)
--remove-credentials-section Remove a section's credentials
--remove-service Remove MySQL Router as a Windows service.
--service Start MySQL Router as a Windows service.
--update-credentials-section Update a section's credentials

mysqlrouter Option Descriptions