From 26d744cc8592ba082961e4c2c314d078ce5596f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org> Date: Tue, 24 Mar 2020 13:05:45 +0100 Subject: [PATCH] MAINT: reinsert setting of a root mysql connection --- make_db | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/make_db b/make_db index 63a5060..96571f7 100755 --- a/make_db +++ b/make_db @@ -24,8 +24,20 @@ # To fail fast, but beware https://mywiki.wooledge.org/BashFAQ/105 -source utils/load_settings.sh +source .config || true + +if [ -z $LOGIN_PATH ] ; then + MYSQL_CONNECTION="--host=${MYSQL_HOST} --port=${MYSQL_PORT} + --user=${MYSQL_USER} + --password=${MYSQL_USER_PASSWORD}" +else + MYSQL_CONNECTION="--login-path=$LOGIN_PATH" +fi + +INSTALL_SQL_FILE="db_2_0.sql" + +SQL="$MYSQL_CMD $MYSQL_CONNECTION" set -e function fail() { @@ -144,8 +156,6 @@ function restore_db() { } function test-connection() { - echo "halllooooo" - echo $SQL $SQL -e "select 0;" } @@ -209,11 +219,6 @@ function _db_exists() { && return 0 || return 1 } -source .config || true - -INSTALL_SQL_FILE="db_2_0.sql" - -SQL="$MYSQL_CMD $MYSQL_CONNECTION" case $1 in "drop") drop $2 ;; -- GitLab