# Introductions
Planning to connect to multiple Cluster at once from a single server? heres the plan...

- Cluster 1 
  - c1-node-1
  - c1-node-2
  - c1-node-3
- Cluster 2
  - c2-node-1
  - c2-node-2
  - c2-node-3
- Cluster 3
  - c3-node-1
  - c3-node-2
  - c3-node-3


# Prerequisite 
- install the mysqlrouter as usual
- do not bootstrap anything yet
- set your /etc/hosts files containing all the relevant servers
- always set different base port so it doesnt clash to each other
- always set different https port so it doesnt clash to each other

# Installation
- run the command for bootstrapping the servers
  ```
  ##boostrap the Cluster 1
  
  $> mysqlrouter --boostrap <boostrap-user>@<c1-node-1> -d <c1-conf-directory> --user=mysqlrouter --conf-base-port=6446 --https-port=18443
  
  
  ##boostrap the Cluster 2
  
  $> mysqlrouter --boostrap <boostrap-user>@<c1-node-2> -d <c2-conf-directory> --user=mysqlrouter --conf-base-port=7446 --https-port=28443
  
  
  ##boostrap the Cluster 3
  
  $> mysqlrouter --boostrap <boostrap-user>@<c1-node-3> -d <c3-conf-directory> --user=mysqlrouter --conf-base-port=8446 --https-port=38443
  ```

- once the boostrap is done, you can start using the nohup command to make it run on the background
  ```
  $> nohup mysqlrouter -c <c1-config-directory> &
  $> nohup mysqlrouter -c <c2-config-directory> &
  $> nohup mysqlrouter -c <c3-config-directory> &
  ```
- to check your setup is working just check the `ps` command
  ```
  ps -ef | grep mysqlrouter
  ```
- the command above should show 3 of the instances of mysqlrouter processes has been successfully started.