From 2205fca64d2b33710518d154dd76c6b8f2293df7 Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 23 Feb 2024 15:55:33 +0100 Subject: [PATCH] mysql_secure_installation correction --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index aa16328..0f65d34 100644 --- a/install.sh +++ b/install.sh @@ -98,7 +98,9 @@ if [[ "$answer" == "y" ]]; then echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}" read -s db_root_password 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 echo -e "${PURPLE}${BOLD}Setup Directus database ? (y/n) ${RESET}"