From 3ceb643487d43e27977a11b12be36f1165a69a31 Mon Sep 17 00:00:00 2001 From: Benedikt Koeppel Date: Sat, 18 Feb 2012 21:50:26 +0100 Subject: [PATCH] fixed the generating of .my.cnf --- conf/type/__mysql_server/gencode-remote | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/type/__mysql_server/gencode-remote b/conf/type/__mysql_server/gencode-remote index 782a4cb6..07826d27 100755 --- a/conf/type/__mysql_server/gencode-remote +++ b/conf/type/__mysql_server/gencode-remote @@ -19,13 +19,18 @@ # # -# store the root password in /root/.my.cnf so that processes can connect # to the database without requiring a passwort input rootpassword="$(cat "$__object/parameter/password")" # set root password mysqladmin -u root password $rootpassword +# store the root password in /root/.my.cnf so that processes can connect +cat <<-EOF > /root/.my.cnf + [client] + password=$rootpassword +EOF + # remove anonymous users mysql -u root -p <<-EOF DELETE FROM mysql.user WHERE User='';