Your Database may very well be setup to Authenticate the Accessing User on
127.0.0.1 and not 'localhost' (or vice-versa). This would be setup in the
database when setting credentials for a user, in the case with MySQL.

On Wed, May 2, 2012 at 9:52 PM, Peter of the Norse <
rahmcoff+...@radio1190.org> wrote:

> There is a difference between 'localhost' and the empty string.
> 'localhost' translates into 127.0.0.1 and is sent using the internet. The
> empty string means to use local sockets for communication. At least with
> PostgreSQL. (It might be different with MySQL.)
>
> In short, this is not a bug. Please don't treat it as such, and learn the
> connection settings of your database.
>
> On Apr 3, 2012, at 11:16 AM, Andre Terra wrote:
>
> It could be a regression bug.
>
> To be honest, I don't see a reason why '' should become 'localhost'
> automagically. I'd much prefer if users were forced to write 'localhost'
> rather than having Django do it (and fail) for them.
>
> Explicit is better than implicit.
>
> If you haven't yet, please file a bug report:
> https://code.djangoproject.com/newticket
>
>
> Cheers,
> AT
>
>
> On Tue, Apr 3, 2012 at 12:25 PM, thongor <vmana...@gmail.com> wrote:
>
>> Wow this post is really old but this also solved my problem strangely
>> enough.
>>
>> On Thursday, June 25, 2009 2:48:32 PM UTC-4, amy wrote:
>>>
>>> I had this same problem...the user and pass were fine but no users
>>> could authenticate on any DB, regardless of settings.
>>>
>>> Turns out my issue was only that I needed to add the string
>>> "localhost" to the host parameter.
>>>
>>> It's odd since the comments specifically state to leave it blank for
>>> localhost...but oh well. It worked.
>>>
>>> DATABASE_HOST = 'localhost'             # Set to empty string for
>>> localhost. Not used with sqlite3.
>>>
>>> Odd.
>>>
>>> On May 31, 6:14 am, Tim Chase <django.us...@tim.thechases.**com> wrote:
>>> > mizan rahman wrote:
>>> > > No, i've checked that i've created a user named "djangouser" and the
>>> > > problem still exist what will i do? Plz help me
>>> >
>>> > and you've checked that the password in settings.py is correct?
>>> > You only confirmed one of the two problems I suggested.
>>> >
>>> > If both are correct, you may have to include the section of your
>>> > pg_hba.conf that defines access permissions.  It usually looks
>>> > something like
>>> >
>>> > ##############################**##############################**##
>>> > local   all         postgres                          ident sameuser
>>> >
>>> > # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
>>> >
>>> > # "local" is for Unix domain socket connections only
>>> > local   all         all                               ident sameuser
>>> > # IPv4 local connections:
>>> > host    all         all         127.0.0.1/32          md5
>>> > # IPv6 local connections:
>>> > host    all         all         ::1/128               md5
>>> > ##############################**##############################**##
>>> >
>>> > along with information about how your connecting in Django (to
>>> > localhost, to the local machine by IP address, to a remote
>>> > machine, etc)
>>> >
>>> > -tkc
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/BI0mwz_xsrsJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
> Peter of the Norse
> rahmc...@radio1190.org
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to