From 9385b53564edf683bd3a70a846d6d9daf593900a Mon Sep 17 00:00:00 2001 From: Joel Scheuner Date: Thu, 19 Jan 2017 14:19:56 +0100 Subject: [PATCH] Fix reprovisioning after VM restart Reprovisioning or server restart led to broken db connection according to: https://github.com/brint/wordpress-cookbook/issues/55#issuecomment-99535445 --- recipes/database.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/database.rb b/recipes/database.rb index 282843c..160147b 100644 --- a/recipes/database.rb +++ b/recipes/database.rb @@ -53,8 +53,11 @@ action [:create, :start] end - socket = "/var/run/mysql-#{db['instance_name']}/mysqld.sock" + directory '/var/run/mysqld' do + action :create + end + socket = "/var/run/mysql-#{db['instance_name']}/mysqld.sock" if node['platform_family'] == 'debian' link '/var/run/mysqld/mysqld.sock' do to socket