From fce49839a3077d84819d01f46bdda6447c04057b Mon Sep 17 00:00:00 2001 From: Rudolf Byker Date: Fri, 24 May 2019 13:25:45 -0500 Subject: [PATCH] Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE MySQL 5.7 is old, and the latest versions fail on "GRANT USAGE" if the user does not exist. "DROP USER IF EXISTS" has been with us since 5.7, so all users should have it by now. This patch fixes the issue. To test: Try to koha_remove a site, and if it works with no errors, all good! --- debian/scripts/koha-remove | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove index 94f5915c8a..ad31c8ed8b 100755 --- a/debian/scripts/koha-remove +++ b/debian/scripts/koha-remove @@ -67,10 +67,8 @@ do then # The grant creates the user in case it isn't, we don't want our loop to fail if it has already being deleted. mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <