diff options
author | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-06-30 08:15:27 -0500 |
---|---|---|
committer | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-06-30 08:15:27 -0500 |
commit | 7af699e72802817d5a19fc0c4e016f6aeb9dce1c (patch) | |
tree | c43f09869e2a4cba749358a6909171574e3faf0c | |
parent | 654ec1e1baf00ed9b99f3bde0ab594800ce28366 (diff) | |
download | oslo-db-7af699e72802817d5a19fc0c4e016f6aeb9dce1c.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: I42912629daaca44250270fca8d9534b801e95d7b
Co-written-by: Riccardo Pittau <elfosardo@gmail.com>
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
-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 07a0785..505a58c 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 " |