diff options
author | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-06-22 14:18:45 -0500 |
---|---|---|
committer | Jay Faulkner <jay@jvf.cc> | 2022-09-12 11:39:29 -0700 |
commit | 742e0100f5d51f6c626827236611f7e75998f88f (patch) | |
tree | fa785f7ad087583f34ff774ca02e87f96ac2af0b | |
parent | 231a41c924ceb6de2b92716c712f90442d3a79f2 (diff) | |
download | ironic-742e0100f5d51f6c626827236611f7e75998f88f.tar.gz |
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: I2b73a532deb8782c2c0bb05070b727e9edc6e9d8
Co-written-by: Riccardo Pittau <elfosardo@gmail.com>
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
(cherry picked from commit 58693c7f4db0c65c8a0ed8037bcacbbf07a7346e)
(cherry picked from commit 8d6cf57bb4417115f6640c714d53e5e723b2d40f)
-rwxr-xr-x | tools/test-setup.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/test-setup.sh b/tools/test-setup.sh index 186507e1d..c82f4716a 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;" # Now create our database. mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e " |