mysql_secure_installation correction 2

This commit is contained in:
Valentin 2024-02-23 16:04:47 +01:00
parent 2205fca64d
commit 2bb1275714
1 changed files with 2 additions and 3 deletions

View File

@ -98,9 +98,8 @@ if [[ "$answer" == "y" ]]; then
echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}"
read -s db_root_password
echo
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
printf "\n n\n y\n ${db_root_password}\n ${db_root_password}\n y\n y\n y\n y\n" | mysql_secure_installation
# https://stackoverflow.com/a/57381699 but not the same values
fi
echo -e "${PURPLE}${BOLD}Setup Directus database ? (y/n) ${RESET}"