Make test-setup.sh compatible with mysql8

Starting from mysql version 8 it's not possible to create a user
implictly when using GRANT.

This patch makes the behavior compatible with that.

Change-Id: Ia5a01089fe0eeb8fe0a1ec5a7cd0557835a46f9e
Co-written-by: Riccardo Pittau <elfosardo@gmail.com>
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-06-30 08:16:33 -05:00
parent e6db0b10a7
commit b220030070
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
1 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,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 "