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
|
fi
|
||||||
install_expect
|
install_expect
|
||||||
CREATE_DIRECTUS_DB=$(expect -c "
|
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:\"
|
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\"
|
|
||||||
")
|
")
|
||||||
echo "${CREATE_DIRECTUS_DB}"
|
echo "${CREATE_DIRECTUS_DB}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue