Use UNIX socket instead of TCP socket

In certain use cases, you may be listening on a different interface
and it is not possible to listen to multiple interfaces with MySQL.

This changes the behaviour to connect via the local socket, as
Galera treats 'localhost' as a connection via the UNIX socket and
'127.0.0.1' as using the TCP socket.

This will allow using Galera on a specific interface while still
letting the bootstrap process talk to the local machine via the
socket which is still available.

Change-Id: Ib46f91e0a6becc934984d372bc51fc2aa77a0c95
This commit is contained in:
Mohammed Naser 2018-04-06 15:25:59 -04:00
parent b731a115a3
commit ef6f6d7782
2 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
[client]
host={% if inventory_hostname in galera_cluster_members %}
127.0.0.1
localhost
{% else %}
{{ galera_address }}
{% endif %}

View File

@ -0,0 +1,4 @@
---
upgrade:
- The role now uses the UNIX sockets to communicate to the server instead
of TCP.