mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
Added updating .my.cnf file when changing root password
This commit is contained in:
parent
8dd1d4d581
commit
d4e405b1fa
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue