psycopg2.OperationalError: fe_sendauth: no password supplied

10,520 views
Skip to first unread message

Chris Haynes

unread,
Jun 23, 2009, 10:09:25 PM6/23/09
to Django users
I've just installed postgresql and psycopg2. I supplied a password in
the postgres install, but don't know how to supply it to psycopg2:

~/s/sd$ manage.py syncdb
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/users/home/system/lib/djangotrunk/django/core/management/
__init__.py", line 347, in execute_manager
utility.execute()
File "/users/home/system/lib/djangotrunk/django/core/management/
__init__.py", line 295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/users/home/system/lib/djangotrunk/django/core/management/
base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/users/home/system/lib/djangotrunk/django/core/management/
base.py", line 222, in execute
output = self.handle(*args, **options)
File "/users/home/system/lib/djangotrunk/django/core/management/
base.py", line 351, in handle
return self.handle_noargs(**options)
File "/users/home/system/lib/djangotrunk/django/core/management/
commands/syncdb.py", line 48, in handle_noargs
cursor = connection.cursor()
File "/users/home/system/lib/djangotrunk/django/db/backends/
__init__.py", line 62, in cursor
cursor = self._cursor(settings)
File "/users/home/system/lib/djangotrunk/django/db/backends/
postgresql_psycopg2/base.py", line 84, in _cursor
self.connection = Database.connect(conn_string, **self.options)
psycopg2.OperationalError: fe_sendauth: no password supplied

Dhruv Adhia

unread,
Jun 23, 2009, 11:54:54 PM6/23/09
to django...@googlegroups.com
I think combo of these links should help you,

http://hocuspokus.net/2008/05/install-postgresql-on-ubuntu-804
find out where pg_hba.conf

should be under your 8.3/main/ , I am not sure just find it out. This file has all the permission stuff.

Also otherwise look at docs
http://www.postgresql.org/docs/current/static/libpq-pgpass.html

Happy debugging :)
--
Dhruv Adhia
http://thirdimension.com

Bill Freeman

unread,
Jan 1, 2013, 3:51:10 PM1/1/13
to django...@googlegroups.com


On Tue, Jan 1, 2013 at 12:30 PM, hu mingchun <huming...@gmail.com> wrote:
add localhost to host field in settings.py

在 2009年6月24日星期三UTC+8上午10时09分25秒,Chris Haynes写道:

It goes in the databases section of settings.py in the password field.
Reply all
Reply to author
Forward
0 new messages