Initializing MySQL Router
- Initialize MySQL Router.
1mysqlrouter --bootstrap root@127.0.0.1:3306 --user=root

127.0.0.1:3306 indicates the IP address of the primary node.
- View the default configuration file generated by MySQL Router after initialization.
1cat /etc/mysqlrouter/mysqlrouter.conf
- Start MySQL Router.
1mysqlrouter &
MySQL Router is deployed. Note that MySQL Router uses port-based routing. It provides a write port and a read port to implement read/write splitting.
- Stop MySQL Router.
- Query the process ID of MySQL Router.
1ps -ef|grep mysqlrouter

- Stop the MySQL Router process.
1kill -9 72890
- Query the process ID of MySQL Router.
Parent topic: Deploying MySQL Router