This is part of the config
[routing:MYCLUSTER_x_rw]
bind_address=0.0.0.0
bind_port=3308
socket=/opt/mysql/MYCLUSTER_x_rw/mysqlx.sock
destinations=metadata-cache://MYCLUSTER_x_rw/?role=PRIMARY # <----- I need to know the host names
routing_strategy=first-available
protocol=x
I need to figure out what is the actual destinations
key's value going to be once the router is going to start up. How do I find that out?
Have a look at the configuration file options documentation.
In short, just change
MYCLUSTER_x_rw
to the name of the cluster you created. If you created the mysql innodb cluster by shell asdba.createCluster('testCluster');
, then in the config file you should writedestinations=metadata-cache://testCluster/?role=PRIMARY
.Please notice, if you use metadata-cache for destinations, you have to define it in the config file as below:
Here is another example of the full config file.