[tests] Create db user before grant

Starting in mysql8, we can't expect
a db user to be created with the GRANT
command, we'll need to create one
explicitly.

Change-Id: Ice03cf9ca0419329b1fcd932160b4f48e18839b4
This commit is contained in:
Goutham Pacha Ravi 2020-12-17 22:53:42 -08:00
parent fe84ebb7ea
commit b1f2a42540
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 "