From 53e23a96b057780f1ce6486aacf00a442f96e888 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 9 Jul 2014 16:15:16 -0400 Subject: [PATCH] Add local_bind flag to my.cf This change enables the MySQL configuration file's network socket bind to be changed from 0.0.0.0, to the local-ipv4 address via the heat template. mysql: local_bind: true The absence of the option will result in the bind returning to the default of 0.0.0.0. This change was implemented this way so the changes to the heat template could land later. Change-Id: Iac1274cc52014f25887d696261b32146afc926dd --- .../mysql-common/os-apply-config/mnt/state/etc/mysql/my.cnf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/elements/mysql-common/os-apply-config/mnt/state/etc/mysql/my.cnf b/elements/mysql-common/os-apply-config/mnt/state/etc/mysql/my.cnf index 91a868e86..fc6fe6eab 100644 --- a/elements/mysql-common/os-apply-config/mnt/state/etc/mysql/my.cnf +++ b/elements/mysql-common/os-apply-config/mnt/state/etc/mysql/my.cnf @@ -9,7 +9,12 @@ user = mysql default_storage_engine = InnoDB socket = /var/run/mysqld/mysqld.sock pid_file = /var/run/mysqld/mysqld.pid +{{#mysql.local_bind}} +bind-address = {{local-ipv4}} +{{/mysql.local_bind}} +{{^mysql.local_bind}} bind-address = 0.0.0.0 +{{/mysql.local_bind}} # UTF8 # character-set-client-handshake = FALSE