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
This commit is contained in:
parent
7d6c71ba26
commit
b54839f382
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user