We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dd1d4d commit d4e405bCopy full SHA for d4e405b
bin/v-change-database-host-password
@@ -46,7 +46,11 @@ case $type in
46
query="$query password=PASSWORD('$dbpass')"
47
query="$query WHERE User='$dbuser';"
48
query="$query FLUSH PRIVILEGES;"
49
- mysql_query "$query" ;;
+ mysql_query "$query" ;
50
+ if [ "$dbuser" == "root" ]; then
51
+ echo -e "[client]\npassword='$dbpass'\n" > /root/.my.cnf
52
+ chmod 600 /root/.my.cnf
53
+ fi;;
54
pgsql) echo "TBD" >/dev/null;;
55
esac
56
0 commit comments