From 0972fa6eab8c9111311f082ba8abfdc6b4a40945 Mon Sep 17 00:00:00 2001 From: nil Date: Wed, 2 Oct 2024 17:48:56 +0200 Subject: commit changes --- scripts/create_db.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 scripts/create_db.sh (limited to 'scripts/create_db.sh') diff --git a/scripts/create_db.sh b/scripts/create_db.sh new file mode 100644 index 0000000..c0e759c --- /dev/null +++ b/scripts/create_db.sh @@ -0,0 +1,27 @@ +#!/bin/bash +echo "choose a password for the database:" +read input +echo "use xampp's version of mariadb? [y/n]" +read answer + +if [[ $answer == 'y' ]] then + mariadb="/opt/lampp/bin/mariadb" +else + mariadb="mariadb" +fi + +echo "use sudo? [y/n]" +read answer + +if [[ $answer == 'y' ]] then + sudo="sudo" +fi + +echo "creating database..." +$sudo $mariadb -u root <