MySQL Router requires a configuration file. Although Router searches a predetermined list of default paths for the configuration file, it is common to start Router by passing in a configuration file with the Show The process of configuring MySQL Router to automatically start when the host reboots is similar to the steps needed for MySQL server, which is described at Starting and Stopping MySQL Automatically. For example, when using systemd:
Example Log OutputStarting MySQL Router generates several log entries, for example when connecting to a sandboxed InnoDB Cluster:
The log shows that MySQL Router is listening on four ports, lists the active routing strategies by name, InnoDB Cluster information, and more. For example, the first line lists the active routing strategy named
See how the name, port, and mode were taken directly from the configuration file. In this way, you can quickly determine which routing strategies are active. This could be particularly useful if running several instances of MySQL Router, or if multiple configuration files are loaded. On Windows, MySQL Router can install, remove, or start the service. By default, the service name is MySQLRouter. For additional information, see the Example Start and Stop Scripts Bootstrapping MySQL Router with the
Performance RecommendationsFor best performance, MySQL Router is typically installed on the same host as the application that uses it. Possible reasons include:
You can run multiple MySQL Router instances on your network, and you do not need to isolate MySQL Router to a single machine. This is because MySQL Router has no affinity for any particular server or host. Figure 3.1 Example MySQL Router Deployment What is MySQL router?MySQL Router is part of InnoDB Cluster and is lightweight middleware that provides transparent routing between your application and back-end MySQL Servers. It is used for a wide variety of use cases, such as providing high availability and scalability by routing database traffic to appropriate back-end MySQL servers.
What is the password for MySQL router configuration?The default username for your MySQL router is [email protected]. The default password is admin.
What is the host name in MySQL router configuration?Hostname: Host name of the primary (seed) server in the InnoDB Cluster ( localhost by default). Port: The port number of the primary (seed) server in the InnoDB Cluster ( 3306 by default).
Should I bootstrap MySQL router?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.
|