prabowomurti / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

A username is sent on connect even with empty username field #763

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up a DB server to require a password for your username @ your computer.
2. Use Sequel-Pro to connect to that server with the username and password 
blank.

What is the expected output? What do you see instead?
I expected the server to treat my connection as an anonymous one. Instead, it 
recognized my connection as coming from my username @ my computer and requires 
a password.

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server?
0.9.8
mysql  Ver 14.12 Distrib 5.0.51a, for pc-linux-gnu (i686) using readline 5.0

Please provide any additional information below.
I do this for a server where anonymous access is allowed read-only grants, but 
I have write privileges for my username. At this point in time, to establish 
anonymous access I have to enter some bogus username to get it not to use my 
username.

Thanks,
-Gene

Original issue reported on code.google.com by g...@bnl.gov on 16 Jul 2010 at 3:38

GoogleCodeExporter commented 9 years ago
Hi Gene,

I've been looking into this a little further, and the decision for this is 
actually happening at the MySQL library level.

The logic appears to be that *if* the server is set up with a password for your 
username, and you connect with no username set, it'll attempt to use your 
username.  If you don't have an account set up for your username, but do have 
an anonymous account set up, it'll try that.

(It's slightly more complex - if the anonymous user is set not to need a 
password, and you connect with a password, it'll try to connect with your 
username, but not if you try to connect without a password - then it'll work.  
And so forth…)

There doesn't actually even seem to be a way to connect explicitly as the 
anonymous user - the only way is to specify a blank username, and then the odd 
logic above kicks in anyway.

I'm afraid I can only conclude that we'll have to mark this as WontFix - the 
only way to trigger this behaviour by default would I think be to change your 
MySQL username to no longer match your computer's username…

Hope that makes sense - do comment further if not.

Original comment by rowanb@gmail.com on 16 Jul 2010 at 11:30