DB Credential code update
parent
c939c4a519
commit
87080506c0
|
@ -30,6 +30,7 @@ echo "Resetting the root password..."
|
||||||
# Reset the root password in safe mode
|
# Reset the root password in safe mode
|
||||||
sudo mysql -u root <<EOF
|
sudo mysql -u root <<EOF
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
|
ALTER USER 'root'@'localhost' IDENTIFIED BY '$new_root_password';
|
||||||
ALTER USER 'root'@'127.0.0.1' IDENTIFIED BY '$new_root_password';
|
ALTER USER 'root'@'127.0.0.1' IDENTIFIED BY '$new_root_password';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
EOF
|
EOF
|
||||||
|
@ -63,6 +64,9 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Introduce a delay to allow MariaDB to fully initialize
|
||||||
|
sleep 5
|
||||||
|
|
||||||
# Create MySQL database and user with the new root password
|
# Create MySQL database and user with the new root password
|
||||||
echo "Creating MySQL database and user with the new root password..."
|
echo "Creating MySQL database and user with the new root password..."
|
||||||
mysql -u root -p"$new_root_password" <<EOF
|
mysql -u root -p"$new_root_password" <<EOF
|
||||||
|
|
Loading…
Reference in New Issue