From 9ece49d36e72e0008f2fedf0d87f4cedad1ad208 Mon Sep 17 00:00:00 2001
From: Stefan Galinski <stefan@sgalinski.de>
Date: Tue, 21 Apr 2015 16:30:28 +0200
Subject: [PATCH] [FEATURE] Switch to MySQL 5.6 and reload the configuration
 before using MySQL

---
 recipes/default.rb           | 7 ++++++-
 templates/default/my.cnf.erb | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/recipes/default.rb b/recipes/default.rb
index 51e3109..3ad6c42 100644
--- a/recipes/default.rb
+++ b/recipes/default.rb
@@ -250,6 +250,7 @@ end
 ###################
 
 mysql_service 'default' do
+	version '5.6'
 	initial_root_password 'root'
 	action [:create, :start]
 end
@@ -257,13 +258,17 @@ end
 mysql_config 'default' do
 	source 'my.cnf.erb'
 	action :create
-	notifies :restart, 'mysql_service[default]'
 end
 
 mysql_client 'default' do
 	action :create
 end
 
+# important, because the set configuration isn't used otherwise in the next steps
+mysql_service 'default' do
+	action :restart
+end
+
 ########################
 ### Create Databases ###
 ########################
diff --git a/templates/default/my.cnf.erb b/templates/default/my.cnf.erb
index 96670d2..eb48840 100644
--- a/templates/default/my.cnf.erb
+++ b/templates/default/my.cnf.erb
@@ -39,7 +39,7 @@ character_set_server = utf8
 
 long_query_time = 3
 slow_query_log = 1
-slow_query_log_file = /var/log/mysql/log-slow-queries.log
+slow_query_log_file = /var/log/mysql-default/log-slow-queries.log
 
 [mysqldump]
 quick
-- 
GitLab