Bugzilla – Attachment 89528 Details for
Bug 22128
koha-remove fails mysql ERROR 1133 (42000) at line 2: Can't find any matching row in the user table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use "DROP USER IF EXISTS" instead of "GRANT USAGE" before "DROP USER".
file_22128.txt (text/plain), 795 bytes, created by
Rudolf Byker
on 2019-05-10 08:50:06 UTC
(
hide
)
Description:
Use "DROP USER IF EXISTS" instead of "GRANT USAGE" before "DROP USER".
Filename:
MIME Type:
Creator:
Rudolf Byker
Created:
2019-05-10 08:50:06 UTC
Size:
795 bytes
patch
obsolete
>diff --git a/koha-remove b/koha-remove.original >index 66777aa..bd4fa39 100755 >--- a/koha-remove >+++ b/koha-remove.original >@@ -66,9 +66,12 @@ do > mysql_hostname="localhost" > if [ "$keepmysql" != "1" ] > 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 <<eof >-DROP USER IF EXISTS \`koha_$name\`@\`%\`; >-DROP USER IF EXISTS \`koha_$name\`@\`$mysql_hostname\`; >+GRANT USAGE ON \`koha_$name\`.* TO \`koha_$name\`@\`%\`; >+GRANT USAGE ON \`koha_$name\`.* TO \`koha_$name\`@\`$mysql_hostname\`; >+DROP USER \`koha_$name\`@\`%\`; >+DROP USER \`koha_$name\`@\`$mysql_hostname\`; > DROP DATABASE IF EXISTS \`koha_$name\`; > FLUSH PRIVILEGES; > eof
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22128
:
89528
|
90081
|
90491
|
90492
|
90493
|
91063
|
91064