Specialize galera client config
For reliable operation, the mysql client configuration must point to the local instance, within galera containers. However this prevents the mysql client from working on other constainers (eg utility). This patch defaults the mysql connection to the VIP, then overrides that to 127.0.0.1 for galera containers. Related: #413
This commit is contained in:
parent
a2853e0da4
commit
a9a9d04f30
@ -15,6 +15,11 @@
|
||||
|
||||
service_name: mysql
|
||||
|
||||
# Defaults to mysql_address (VIP) when unset.
|
||||
# Should only be set for the galera group so that they always connect to
|
||||
# their own instance.
|
||||
mysql_client_host: 127.0.0.1
|
||||
|
||||
container_lvm_fstype: ext4
|
||||
container_lvm_fssize: 5GB
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[client]
|
||||
socket=/var/run/mysqld/mysqld.sock
|
||||
host={{ mysql_client_host|default(mysql_address) }}
|
||||
user=root
|
||||
password={{ mysql_password }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user