Jack Woehr wrote:

I figured this out. It's the "ANY" setup in Privileges. Being set to allow ANY user to login without password, MySQL interestingly interprets that as "even known users with passwords MUST log in without passwords."

Well, that seems to be the effect, but that's not what it is doing. Mysql sorts possible matches of incoming [EMAIL PROTECTED] against the mysql.user table hostname first. So, you had two matches when abcd connected from localhost: ''@localhost and [EMAIL PROTECTED] Explicit text is preferred to wildcards in ranking by specificity, so localhost is a better hostname match than %, hence ''@localhost is chosen.


My two solutions were either to delete the ANY privileges or to create a
second account for [EMAIL PROTECTED] with a password required to
supplement the [EMAIL PROTECTED] with a password required.

Right. Either of these will work. If you add an [EMAIL PROTECTED] entry, when abcd connects from localhost, mysql finds three matches: [EMAIL PROTECTED], ''@localhost, and [EMAIL PROTECTED] Again, localhost is preferred over %, and within localhost abcd is preferred over '', so you get [EMAIL PROTECTED] as the match.


On the other hand, if you remove the anonymous user, then [EMAIL PROTECTED] is the only possible match when abcd connects from localhost, so it is chosen.

Michael

--
Jack J. Woehr            # "[F]ar in the empty sky a solitary esophagus slept
http://www.well.com/~jax #  upon motionless wing; everywhere brooded stillness,
http://www.softwoehr.com #  serenity, and the peace of God." - Mark Twain



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to