problems joining nodes 2 and 3 in a Galera cluster with mysql on ubuntu server 20.04

76 Views Asked by At

My project consists of making a Galera cluster with MySQL on ubuntu 20.04. The problem has been generated when joining the nodes (I have 3) to mysql: the main node does not give me any problem but both node2 and node3 give me problems when joining them. The error I get is the following:

ERROR 2002 (HY000): Cant connect to local MySQL server through socket '/var/run/log/mysqld/mysqld.sock' (2).

I have tried countless things that I have seen on the internet but none manage to fix this error.

I attach photos of both the steps of node1 and node2 where the error appears, a photo of the cluster configuration (it is the same in all of them) and one of the log with the errors.

Galera configution

Log

Node 2 fail

have tried practically everything, I have looked for solutions to this error, to the errors that appeared in the log, I have tried to do it from 0 again and I have also tried with other versions but none have been effective

1

There are 1 best solutions below

0
Ho.Farahmand On

You didn't say anything about how to run mysqld.

Only one of your instances must be run as

mysqld --wsrep-new-cluster

then other nodes with

mysqld

if your cluster initialized before then make sure that in /var/lib/mysql/grastate.dat

safe_to_bootstrap: 1