diff --git a/bin/v-change-database-host-password b/bin/v-change-database-host-password index fc066293..a55a86bc 100755 --- a/bin/v-change-database-host-password +++ b/bin/v-change-database-host-password @@ -46,7 +46,11 @@ case $type in query="$query password=PASSWORD('$dbpass')" query="$query WHERE User='$dbuser';" query="$query FLUSH PRIVILEGES;" - mysql_query "$query" ;; + mysql_query "$query" ; + if [ "$dbuser" == "root" ]; then + echo -e "[client]\npassword='$dbpass'\n" > /root/.my.cnf + chmod 600 /root/.my.cnf + fi;; pgsql) echo "TBD" >/dev/null;; esac