Installing Percona Cluster on RedHat 7 - Part III

Configuring cluster nodes

Now that we have Percona installed on each of the machines, let's configure the three nodes and their synchronization to remain read/write nodes.

Creating a user for SST authentication

This user must be created on all machines, we will create a new user for SST authentication and edit the MYSQL configuration.

SST (State Snapshot Transfer) is a complete data copy from one server as a donor to another server as an assembler. For SST authentication, we need to create a new user named 'sstuser' with a password. And for the SST method, we will use xtrabackup-v2 instead of rsync.

ip

This will open a MYSQL console in which we will copy the following group of commands to create the synchronization user with its respective password. If applicable, please change the password for a more secure one.

ip0

Setting up the first node

We are going to edit the configuration so we stop the service and open the configuration file.


ip1

Change all lines corresponding to wsrep with the following.


ip2

Note that in  gcomm   we have associated all the nodes, this so that it consults any of the nodes as a synchronization source.

Also in the wsrep_noe_name and the wsrep_node_address I have put percona1 which corresponds to the node that I am configuring

More info:  https://www.percona.com/doc/percona-xtradb-cluster/5.6/manual/bootstrap.html

Setting up the second node

We are going to edit the configuration so we stop the service and open the configuration file


ip3

Change all lines corresponding to wsrep with the following.


ip4

Setting up the third node

Let's edit the configuration so we stop the service and open the configuration file

ip5

Change all lines corresponding to wsrep with the following:

ip6

Starting the cluster

First we will stop all MariaDB services on each of the nodes keeping the order from the last to the first


ip7

We can make sure the service is stopped with the following command.


ip

Locate yourself on the first node and execute the following command, this command will start that first node as the initial source of the data and it will be the initial reliable replica node, however in the future the reliable node will change according to the synchronization that is being carried out, that is, you should only execute this command once on this machine.


ip

Now we can check the status of the cluster with:


ip

It will ask you for the password, enter it and you can see a result like the following image where the active nodes are listed.


ip

Now start the nodes with the following command:


ip

If everything has gone well, you can check the size of the cluster again, which should now indicate that it is 3. In fact, you can do it from any of the three nodes.

ip

If you want to read the first and second part of this article, here are the links:

https://www.seedem.co/es/blog/instalacion-de-percona-cluster-en-redhat-7-parte-i

https://www.seedem.co/es/blog/instalacion-de-percona-cluster-en-redhat-7-parte-ii

 

Aldibier_Morales