From 93f613c3565151fd8478a6b7563d2af1850b2a86 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Jun 2020 07:33:14 +0300 Subject: Add workaround for create sql user and grant rights to it In some mysql version default grant code not works. --- tools/ci/travis.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/ci') diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 489e15bc7..a268f38eb 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -154,7 +154,12 @@ case "$MODE" in ;; adduser) echo "Adding user $NEWUSER as $DBUSER, with access to database $DBNAME..." - mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" + echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';"' || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true ;; build) (cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error." -- cgit v1.2.3-70-g09d2