install_db_server does not drop the user if exists
Change-Id: Ia4f3dfa70ba8d1e273fdfda837a5d16a0aacb414
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/scripts/install-db-server.sh b/scripts/install-db-server.sh
index ec0dd6c..26738a6 100755
--- a/scripts/install-db-server.sh
+++ b/scripts/install-db-server.sh
@@ -167,8 +167,7 @@
#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