Skip to content

Commit

Permalink
Database indication restored
Browse files Browse the repository at this point in the history
  • Loading branch information
martignoni committed Jun 22, 2017
1 parent 57dab2c commit f6a55ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/changepassword.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ if [ -n "$(getent passwd $USER)" ] && [ $USER != "root" ]; then
# change the password if non empty
if [ -n "$NEWPASSWORD" ]; then
# 1. change password for database user "moodlebox"
mysql -e "UPDATE user SET password=PASSWORD('$NEWPASSWORD') WHERE user='moodlebox'; FLUSH PRIVILEGES;"
mysql -e "UPDATE mysql.user SET password=PASSWORD('$NEWPASSWORD') WHERE user='moodlebox'; FLUSH PRIVILEGES;"
# 2. change password for database user "phpmyadmin"
mysql -e "UPDATE user SET password=PASSWORD('$NEWPASSWORD') WHERE user='phpmyadmin'; FLUSH PRIVILEGES;"
mysql -e "UPDATE mysql.user SET password=PASSWORD('$NEWPASSWORD') WHERE user='phpmyadmin'; FLUSH PRIVILEGES;"
# 3. change password for database user "phpmyadmin" in phpMyAdmin config-db.php
sed -i "/\$dbpass/c\$dbpass='$NEWPASSWORD';" /etc/phpmyadmin/config-db.php
# 4. change password for Unix account "moodlebox"
Expand Down

0 comments on commit f6a55ac

Please sign in to comment.