[Koha-bugs] [Bug 6416] koha-remove fails when dropping user

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 18 14:57:35 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6416

Simon Story <simon.story at catalyst-eu.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.story at catalyst-eu.net

--- Comment #2 from Simon Story <simon.story at catalyst-eu.net> 2011-11-18 13:57:35 UTC ---
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?

Observe the obtuseness of mysql:

mysql> create user mysql_is_erratic;
Query OK, 0 rows affected (0.00 sec)

mysql> select User,Host from user where User like 'mysql_is_erratic';
+------------------+------+
| User             | Host |
+------------------+------+
| mysql_is_erratic | %    |
+------------------+------+
1 row in set (0.00 sec)

mysql> create user 'mysql_is_erratic'@'';
Query OK, 0 rows affected (0.00 sec)

mysql> create user 'mysql_is_erratic'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> select User,Host from user where User like 'mysql_is_erratic';
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| mysql_is_erratic |           |
| mysql_is_erratic | %         |
| mysql_is_erratic | localhost |
+------------------+-----------+
3 rows in set (0.00 sec)

mysql> drop user 'mysql_is_erratic';              
Query OK, 0 rows affected (0.00 sec)

mysql> select User,Host from user where User like 'mysql_is_erratic';
+------------------+-----------+
| User             | Host      |
+------------------+-----------+
| mysql_is_erratic |           |
| mysql_is_erratic | localhost |
+------------------+-----------+
2 rows in set (0.00 sec)

mysql> drop user 'mysql_is_erratic'@'';
Query OK, 0 rows affected (0.00 sec)

mysql> drop user 'mysql_is_erratic'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> select User,Host from user where User like 'mysql_is_erratic';
Empty set (0.00 sec)

simons at simonskoha:~/src/koha/debian/scripts$ mysql --version
mysql  Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64) using readline
6.1

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- 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