move to command folders
This commit is contained in:
10
commands/db/db-change-root-password.sh
Normal file
10
commands/db/db-change-root-password.sh
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
if [ -z "$1" ] && [ -z "$2" ]; then
|
||||
read -sp "Old Password: " oldPassword
|
||||
read -sp "New Password: " newPassword
|
||||
else
|
||||
oldPassword="$1"
|
||||
newPassword="$2"
|
||||
fi
|
||||
|
||||
mysql -uroot -p${oldPassword} -e "SET PASSWORD FOR root@'localhost' = PASSWORD('$newPassword');"
|
Reference in New Issue
Block a user