From 853870d9742e73552a0d76f7d6d1ad9a393e2f96 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 11 Apr 2012 21:58:50 +0000 Subject: [PATCH] Execute GRANT statement as sipwise user From: Michael Prokop --- ngcp-update-db-schema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ngcp-update-db-schema b/ngcp-update-db-schema index 11441179..94c64c1b 100755 --- a/ngcp-update-db-schema +++ b/ngcp-update-db-schema @@ -35,7 +35,7 @@ if [ -z "${SIPWISE_DB_PASSWORD}" ] ; then exit 1 fi -if ! mysql -e "GRANT ALL PRIVILEGES ON *.* TO sipwise@localhost IDENTIFIED BY '${SIPWISE_DB_PASSWORD}' WITH GRANT OPTION;" ; then +if ! mysql -usipwise -p"${SIPWISE_DB_PASSWORD}" -e "GRANT ALL PRIVILEGES ON *.* TO sipwise@localhost IDENTIFIED BY '${SIPWISE_DB_PASSWORD}' WITH GRANT OPTION;" ; then echo 'Error: grants for user sipwise on localhost could not be applied.' >&2 exit 1 fi