From: garciadeblas Date: Wed, 19 Apr 2017 16:17:11 +0000 (+0200) Subject: install_db_server does not drop the user if exists X-Git-Tag: v2.0.0~22^2~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d81496cabe6c0dfeadbb4dc1852a3d336032c576;p=osm%2FRO.git install_db_server does not drop the user if exists Change-Id: Ia4f3dfa70ba8d1e273fdfda837a5d16a0aacb414 Signed-off-by: garciadeblas --- diff --git a/scripts/install-db-server.sh b/scripts/install-db-server.sh index ec0dd6cd..26738a67 100755 --- a/scripts/install-db-server.sh +++ b/scripts/install-db-server.sh @@ -167,8 +167,7 @@ if db_exists "mano_db" $TEMPFILE ; then #echo "REVOKE ALL PRIVILEGES ON mano_db.* FROM 'mano'@'localhost';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 #echo "DELETE USER 'mano'@'localhost';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 mysqladmin --defaults-extra-file=$TEMPFILE -s create mano_db || ! echo "Error creating mano_db database" || exit 1 - echo "DROP USER 'mano'@'localhost';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 - echo "CREATE USER 'mano'@'localhost' identified by 'manopw';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 + echo "CREATE USER 'mano'@'localhost' identified by 'manopw';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" echo "GRANT ALL PRIVILEGES ON mano_db.* TO 'mano'@'localhost';" | mysql --defaults-extra-file=$TEMPFILE -s || ! echo "Failed while creating user mano at database" || exit 1 echo " Database 'mano_db' created, user 'mano' password 'manopw'" else