[Koha-bugs] [Bug 6416] koha-remove fails when dropping user
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 29 15:40:09 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6416
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomascohen at gmail.com
--- Comment #7 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to rainer.stowasser from comment #6)
> It seems to have something to do with the restore script
>
> MariaDB [information_schema]> select * from USER_PRIVILEGES;
>
> 'koha_bibzamg'@'localhost' | def | USAGE | NO
>
> 'koha_zabibli'@'%' | def | USAGE | NO
>
> the user bibzamg was created with koha-create
> the user koha_zabibli'@'%'with koha-restore
(In reply to Simon Story from comment #2)
> The '%' wildcard seems to match when mysql is checking the host the
> connection is being made, not when matching users to delete.
>
> I see in koha-create that 'koha_demo'@'localhost' shouldn't have been
> created. Since the code is:
> CREATE USER \`$mysqluser\`@'%' IDENTIFIED BY '$mysqlpwd'
>
> Perhaps Magnus you are mistaken as to the course of events?
This is current code (20.05's):
mysql_hostname="localhost"
# Set up MySQL database for this instance.
if [ "$op" = create ]
then
if [ ! -e /etc/mysql/debian.cnf ]; then
MYSQL_OPTIONS="-u root"
echo "WARNING: The koha-common.cnf file is a dead soft link!"
else
MYSQL_OPTIONS="--defaults-extra-file=/etc/mysql/koha-common.cnf"
fi
mysql $MYSQL_OPTIONS <<eof
CREATE DATABASE \`$mysqldb\`;
CREATE USER \`$mysqluser\`@'$mysql_hostname' IDENTIFIED BY '$mysqlpwd';
GRANT ALL PRIVILEGES ON \`$mysqldb\`.* TO \`$mysqluser\`@'$mysql_hostname';
FLUSH PRIVILEGES;
eof
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list