Browse Source

Correct syntax to be compatible with mysql8

Starting from mysql version 8 it's not possible to create a user
implicitely when using GRANT.
This patch makes the behavior compatible with that.

Change-Id: I1dc25194de384bf14607aff4e0f230e394f00582
changes/74/735174/1
Riccardo Pittau 1 month ago
parent
commit
b5e894ec56
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tools/test-setup.sh

+ 2
- 2
tools/test-setup.sh View File

@@ -40,8 +40,8 @@ sudo -H mysqladmin -u root password $DB_ROOT_PW
sudo -H mysql -u root -p$DB_ROOT_PW -h localhost -e "
DELETE FROM mysql.user WHERE User='';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.*
TO '$DB_USER'@'%' identified by '$DB_PW' WITH GRANT OPTION;"
CREATE USER '$DB_USER'@'%' IDENTIFIED BY '$DB_PW';
GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'%' WITH GRANT OPTION;"

# Now create our database.
mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e "


Loading…
Cancel
Save