changeset 4:894e6287926f

Fix "slow query" log - previously MySQL didn't have permission to write it
author IBBoard <dev@ibboard.co.uk>
date Wed, 27 Aug 2014 13:46:07 +0000
parents ea71652452e9
children f2056be70cb8
files modules/website/manifests/mysql.pp
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/website/manifests/mysql.pp	Wed Aug 27 12:57:47 2014 +0000
+++ b/modules/website/manifests/mysql.pp	Wed Aug 27 13:46:07 2014 +0000
@@ -23,9 +23,15 @@
         'max_heap_table_size' => '48M',
         'table_open_cache' => '500',
         'slow_query_log'   => '1',
-        'slow_query_log_file' => '/var/log/mysql-slow-query.log',
+        'slow_query_log_file' => '/var/log/mysql/slow-query.log',
       }
     },
+    require => File['/var/log/mysql/']
+  }
+  file { '/var/log/mysql':
+    ensure => directory,
+    owner => 'mysql',
+    group => 'mysql',
   }
   $username = strip($mysqluser)
   $password = strip($mysqlpassword)