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