How can I specify which MariaDB instance to launch in a Galera Cluster
-
05-02-2021 - |
Frage
I have several MariaDB servers, each with multiple instances running. I'm trying to figure out how would I bootstrap a Galera cluster but specify which instance I want to launch i.e:
node1, 2, and 3 each has instances 1-4 running via mysqld_multi, each running on their own port.
I want to use instance 4 on each server for the cluster, so I shut each one down.
On my test cluster (which has a single instance of MariaDB running) bootstrapping is simple: start it on the first node with galera_new_cluster then bring up the other two servers.
How would I do the same thing but specify GNR "4" to bootstrap the cluster?
Lösung
According to the output from mysqld_multi --help
:
--wsrep-new-cluster Bootstrap a cluster.
So on the node you want to bootstrap, I'm assuming you should be able to do:
mysqld_multi --wsrep-new-cluster start 4
And then start the instances on the other two the normal way, assuming all the instances have the necessary config files.