mysql_secure_installation correction

This commit is contained in:
Valentin 2024-02-23 15:55:33 +01:00
parent 52b1f7d496
commit 2205fca64d
1 changed files with 3 additions and 1 deletions

View File

@ -98,7 +98,9 @@ if [[ "$answer" == "y" ]]; then
echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}" echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}"
read -s db_root_password read -s db_root_password
echo echo
echo "$db_root_password" | mysql_secure_installation mariadb -e "SET PASSWORD FOR root@localhost = PASSWORD('${db_root_password}');FLUSH PRIVILEGES;"
printf "${db_root_password}\n n\n n\n n\n y\n y\n y\n" | mysql_secure_installation
# https://stackoverflow.com/a/57381699
fi fi
echo -e "${PURPLE}${BOLD}Setup Directus database ? (y/n) ${RESET}" echo -e "${PURPLE}${BOLD}Setup Directus database ? (y/n) ${RESET}"