summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishakha Agarwal <agarwalvishakha18@gmail.com>2020-08-17 13:37:48 +0530
committerVishakha Agarwal <agarwalvishakha18@gmail.com>2020-08-17 13:37:48 +0530
commitb54839f382b046b7ec8b9633fbea763d31d9949c (patch)
treef98a627e85242a9a8e907efd709ce336125c1af4
parent7d6c71ba26694c21110280e741b9ffe2d36a94ca (diff)
downloadkeystone-b54839f382b046b7ec8b9633fbea763d31d9949c.tar.gz
Fix user creation with GRANT in MySQL 8.0(Ubuntu Focal)
In Ubuntu Bionic (18.04) mysql 5.7 version used to create the user implicitly when using using the GRANT. Ubuntu Focal (20.04) has mysql 8.0 and with mysql 8.0 there is no implicit user creation with GRANT. We need to create the user first before using GRANT command. This patch updates tools/test-setup.sh so that keystone supports ubuntu focal. Story: #2007865 Task: #40190 Change-Id: I86d10729cfc7c02f12df611b56f6e263969dfe4b Closes-Bug: #1885825
-rwxr-xr-xtools/test-setup.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/test-setup.sh b/tools/test-setup.sh
index 0743c82ce..83399ec5a 100755
--- a/tools/test-setup.sh
+++ b/tools/test-setup.sh
@@ -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;"
# Bump the max_connections limit
sudo -H mysql -u root -p$DB_ROOT_PW -h localhost -e "