diff options
author | Andrei Karas <akaras@inbox.ru> | 2020-06-06 07:33:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2020-06-16 03:43:42 +0300 |
commit | 93f613c3565151fd8478a6b7563d2af1850b2a86 (patch) | |
tree | ac37147488d265fa6d789c91cdd47cb4c2b79f17 /tools | |
parent | 56a402c6b096a4b3f7bd6e27ba1dace44638c4dc (diff) | |
download | hercules-93f613c3565151fd8478a6b7563d2af1850b2a86.tar.gz hercules-93f613c3565151fd8478a6b7563d2af1850b2a86.tar.bz2 hercules-93f613c3565151fd8478a6b7563d2af1850b2a86.tar.xz hercules-93f613c3565151fd8478a6b7563d2af1850b2a86.zip |
Add workaround for create sql user and grant rights to it
In some mysql version default grant code not works.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci/travis.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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." |