directus db 8
This commit is contained in:
parent
a90a73e9a9
commit
c32965a4d6
16
install.sh
16
install.sh
|
@ -153,14 +153,18 @@ if [[ "$answer" == "y" ]]; then
|
||||||
fi
|
fi
|
||||||
install_expect
|
install_expect
|
||||||
CREATE_DIRECTUS_DB=$(expect -c "
|
CREATE_DIRECTUS_DB=$(expect -c "
|
||||||
spawn mysql -u root -p <<EOF
|
spawn
|
||||||
CREATE USER 'directus'@'localhost' IDENTIFIED BY '${db_directus_password}';
|
mariadb -u root -p
|
||||||
CREATE DATABASE directus;
|
|
||||||
GRANT ALL PRIVILEGES ON directus.* TO 'directus'@'localhost' IDENTIFIED BY '${db_directus_password}';
|
|
||||||
FLUSH PRIVILEGES;
|
|
||||||
EOF
|
|
||||||
expect \"Enter password:\"
|
expect \"Enter password:\"
|
||||||
send \"$db_root_password\r\"
|
send \"$db_root_password\r\"
|
||||||
|
expect \"mysql>\"
|
||||||
|
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}"
|
echo "${CREATE_DIRECTUS_DB}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue