From 7b42b8e003436bf3a1367ec0954ca505189bfa06 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 19 Jan 2010 15:01:55 -0200 Subject: Adding 'flush privileges' --- manifests/init.pp | 4 ++-- templates/setmysqlpass.sh.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index ee7e91a..8944595 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,7 +27,7 @@ class mysql::server inherits mysql { file { '/usr/local/sbin/setmysqlpass.sh': content => template('mysql/setmysqlpass.sh.erb'), - require => Package[mysql-server], + require => Service['mysql'], owner => root, group => root, mode => 0500, @@ -49,7 +49,7 @@ class mysql::server inherits mysql { $mysql_passwd = $passwd file { "$home/.my.cnf": content => template('mysql/my.cnf.erb'), - require => [ Package[mysql-server] ], + require => Service['mysql'], owner => root, group => root, mode => 0400, diff --git a/templates/setmysqlpass.sh.erb b/templates/setmysqlpass.sh.erb index 9cb3d39..fbca07e 100644 --- a/templates/setmysqlpass.sh.erb +++ b/templates/setmysqlpass.sh.erb @@ -8,5 +8,5 @@ PASSWORD="<%= mysql_rootpw %>" DEFAULTS="/etc/mysql/debian.cnf" # Run -echo "USE mysql; UPDATE user SET Password=PASSWORD('$PASSWORD') WHERE User='root' AND Host='localhost';" | \ +echo "USE mysql; UPDATE user SET Password=PASSWORD('$PASSWORD') WHERE User='root' AND Host='localhost'; flush privileges;" | \ /usr/bin/mysql --defaults-file=$DEFAULTS -- cgit v1.2.3