From 9899916b4a56dbd81266e07eb0123d07781f61ae Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Thu, 8 Jan 2015 18:12:30 -0600 Subject: [PATCH] Use correct MySQL socket file for Ubuntu. --- README.md | 1 - defaults/main.yml | 1 - tasks/configure.yml | 9 --------- vars/Debian.yml | 1 + vars/RedHat.yml | 1 + 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7007985..9bbd537 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,6 @@ The MySQL users and their privileges. A user has the values `name`, `host` (defa mysql_port: "3306" mysql_bind_address: '0.0.0.0' mysql_datadir: /var/lib/mysql - mysql_socket: /var/lib/mysql/mysql.sock Default MySQL connection configuration. diff --git a/defaults/main.yml b/defaults/main.yml index 3c93c8c..4a7a9cb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,7 +13,6 @@ mysql_enablerepo: "" mysql_port: "3306" mysql_bind_address: '0.0.0.0' mysql_datadir: /var/lib/mysql -mysql_socket: /var/lib/mysql/mysql.sock # Memory settings (default values optimized ~512MB RAM). mysql_key_buffer_size: "256M" diff --git a/tasks/configure.yml b/tasks/configure.yml index ac7ca70..a0e8b18 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -10,12 +10,3 @@ - name: Ensure MySQL is started and enabled on boot. service: "name={{ mysql_daemon }} state=started enabled={{ mysql_enabled_on_startup }}" - -- name: Ensure MySQL socket file has correct permissions. - file: - path: "{{ item }}" - mode: 0755 - notify: restart mysql - with_items: - - "{{ mysql_datadir }}" - - "{{ mysql_socket }}" diff --git a/vars/Debian.yml b/vars/Debian.yml index ccc9c07..db19a43 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -5,3 +5,4 @@ mysql_packages: - mysql-common - mysql-server - python-mysqldb +mysql_socket: /var/run/mysqld/mysqld.sock diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 9ccbf55..aeb31cf 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -5,3 +5,4 @@ mysql_packages: - mysql - mysql-server - MySQL-python +mysql_socket: /var/lib/mysql/mysql.sock