Merge "Mariadb: Display error if user is not create"
This commit is contained in:
commit
a0360d07ea
@ -18,7 +18,10 @@ limitations under the License.
|
||||
|
||||
set -e
|
||||
|
||||
mysql --defaults-file=/etc/mysql/admin_user.cnf -e \
|
||||
if ! mysql --defaults-file=/etc/mysql/admin_user.cnf -e \
|
||||
"CREATE OR REPLACE USER '${EXPORTER_USER}'@'%' IDENTIFIED BY '${EXPORTER_PASSWORD}'; \
|
||||
GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO '${EXPORTER_USER}'@'%'; \
|
||||
FLUSH PRIVILEGES;"
|
||||
FLUSH PRIVILEGES;" ; then
|
||||
echo "ERROR: Could not create user: ${EXPORTER_USER}"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user