From c32965a4d63051d2c72c645c599d376176bd153a Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 23 Feb 2024 18:26:16 +0100 Subject: [PATCH] directus db 8 --- install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 0dac138..0855eef 100644 --- a/install.sh +++ b/install.sh @@ -153,14 +153,18 @@ if [[ "$answer" == "y" ]]; then fi install_expect CREATE_DIRECTUS_DB=$(expect -c " - spawn mysql -u root -p <\" + send \"CREATE USER 'directus'@'localhost' IDENTIFIED BY '${db_directus_password}';\r\" + send \"CREATE DATABASE directus;\r\" + send \"GRANT ALL PRIVILEGES ON directus.* TO 'directus'@'localhost' IDENTIFIED BY '${db_directus_password}';\r\" + send \"FLUSH PRIVILEGES;\r\" + expect \"mysql>\" + send \"quit;\r\" + expect eof ") echo "${CREATE_DIRECTUS_DB}" fi