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