You bootstrap MySQL Router against an InnoDB ReplicaSet or
InnoDB Cluster to automatically configure routing. The
bootstrap process is a specific way of running MySQL Router, which
does not start the usual routing and instead configures the
mysqlrouter.conf
file based on the
metadata.
To bootstrap MySQL Router at the command-line, pass in the
--bootstrap
option when you
start the mysqlrouter command, and it
retrieves the topology information from the metadata and
configures routing connections to the server instances.
Alternatively, on Windows use the MySQL Installer to bootstrap MySQL Router.
For more information, see
MySQL Router Configuration with MySQL Installer.
Once MySQL Router has been bootstrapped, client applications then
connect to the ports it publishes. MySQL Router automatically
redirects client connections to the instances based on the
incoming port, for example 6646 is used by default for
read-write
connections using
classic MySQL protocol.
In the event of a topology change, for example, an unexpected failure of an instance, MySQL Router detects the change and adjusts the routing to the remaining instances automatically. This automatic adjustment removes the need for client applications to handle failover, or to be aware of the underlying topology. For more information, see Routing for MySQL InnoDB Cluster.
Do not attempt to configure MySQL Router manually to redirect to
the server instances. Always use the
--bootstrap
option as this
ensures that MySQL Router takes its configuration from the
metadata. See Cluster Metadata and State.