Use /var/run/mariadb on redhat
diff --git a/galera/files/my.cnf b/galera/files/my.cnf
index 016f53c..a24e920 100644
--- a/galera/files/my.cnf
+++ b/galera/files/my.cnf
@@ -13,7 +13,7 @@
user=mysql
basedir=/usr/
datadir=/var/lib/mysql
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
pid_file=mysqld.pid
port=3306
log_error={{ service.log_file }}
@@ -173,14 +173,14 @@
# Protocol version to use
# wsrep_protocol_version=
[MYSQL]
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
#default_character_set=utf8
[client]
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
default_character_set=utf8
[mysqldump]
max_allowed_packet = 512M
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
default_character_set=utf8
[MYSQLD_SAFE]
pid_file=mysqld.pid
diff --git a/galera/files/my.cnf.bootstrap b/galera/files/my.cnf.bootstrap
index 223d910..18f3a8c 100644
--- a/galera/files/my.cnf.bootstrap
+++ b/galera/files/my.cnf.bootstrap
@@ -13,7 +13,7 @@
user=mysql
basedir=/usr/
datadir=/var/lib/mysql
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
pid_file=mysqld.pid
port=3306
log_error={{ service.log_file }}
@@ -86,14 +86,14 @@
# Protocol version to use
# wsrep_protocol_version=
[MYSQL]
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
#default_character_set=utf8
[client]
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
default_character_set=utf8
[mysqldump]
max_allowed_packet = 512M
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
default_character_set=utf8
[MYSQLD_SAFE]
pid_file=mysqld.pid
diff --git a/galera/files/my.cnf.init b/galera/files/my.cnf.init
index bf4ce13..91e2eda 100644
--- a/galera/files/my.cnf.init
+++ b/galera/files/my.cnf.init
@@ -13,7 +13,7 @@
user=mysql
basedir=/usr/
datadir=/var/lib/mysql
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
pid_file=mysqld.pid
port=3306
log_error={{ service.log_file }}
@@ -172,14 +172,14 @@
# Protocol version to use
# wsrep_protocol_version=
[MYSQL]
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
#default_character_set=utf8
[client]
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
default_character_set=utf8
[mysqldump]
max_allowed_packet = 512M
-socket=/var/run/mysqld/mysqld.sock
+socket={{ service.socket }}
default_character_set=utf8
[MYSQLD_SAFE]
pid_file=mysqld.pid
diff --git a/galera/map.jinja b/galera/map.jinja
index 987aa75..2549aa5 100644
--- a/galera/map.jinja
+++ b/galera/map.jinja
@@ -5,13 +5,15 @@
'service': 'mysql',
'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
'log_file': '/var/log/mysql.log',
+ 'socket': '/var/run/mysqld/mysqld.sock',
'config': '/etc/mysql/my.cnf',
},
'RedHat': {
- 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
+ 'pkgs': ['galera', 'mariadb-server', 'mariadb', 'MySQL-python', 'rsync'],
'service': 'mysqld',
'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
'log_file': '/var/log/mariadb/mariadb.log',
+ 'socket': '/var/run/mariadb/mysqld.sock',
'config': '/etc/my.cnf',
},
}, merge=salt['pillar.get']('galera:master')) %}
@@ -22,13 +24,15 @@
'service': 'mysql',
'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
'log_file': '/var/log/mysql.log',
+ 'socket': '/var/run/mysqld/mysqld.sock',
'config': '/etc/mysql/my.cnf',
},
'RedHat': {
- 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
+ 'pkgs': ['galera', 'mariadb-server', 'mariadb', 'MySQL-python', 'rsync'],
'service': 'mysqld',
'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
'log_file': '/var/log/mariadb/mariadb.log',
+ 'socket': '/var/run/mariadb/mysqld.sock',
'config': '/etc/my.cnf',
},
}, merge=salt['pillar.get']('galera:slave')) %}