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='';