cd /tmp
su postgres
createdb conntest
psql -d conntest
That should since you can connect from pgadmin. If it doesn't. run
(as root)
/etc/init.d/postgresql force-restart
and try the above again.
On the django side, I would check settings.py for something like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add
'postgr...
'NAME': 'conntest', # Or path to database
file if using sqlite3.
'USER': 'postgres', # Not used with
sqlite3.
'PASSWORD': 'mypgpass', # Not used with
sqlite3.
'HOST': '', # Set to empty string for
localhost. Not used with sqlite3.
'PORT':'5432', # Set to empty string for
default. Not used with sqlite3.
}
}
On Aug 23, 1:53 pm, SSozuer <selcuk.soz...@gmail.com> wrote:
> i am taking error below:
>
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.
> 5432"?
>
> but there is no such a .s.PGSQL.5432 file. I really dont understand
> what is going on
>
> Selcuk
>
> On Aug 23, 8:12 pm, Subhranath Chunder <subhran...@gmail.com> wrote:
>
>
>
> > You may try to test the connection using the command line interface 'psql'.
>
> > On Tue, Aug 23, 2011 at 10:39 PM, SSozuer <selcuk.soz...@gmail.com> wrote:
> > > Settings in postgresql.conf are ok. And also postgresql is running
> > > without no problem. As i said, i can connect database with pgAdmin
> > > with no error.
> > > Selcuk
>
> > > On Aug 23, 8:03 pm, Landy Chapman <landy.chapm...@gmail.com> wrote:
> > > > Also did the the server actually start? On debian,
> > > > /etc/init.d/postgresql start
>
> > > > > > > Try connecting on the local system. I would guess you can't. It
> > > looks
> > > > > > > like you have a problem with the socket directory. Permissions?
>
> > > > > remember to edit postgresql.conf -- make sure to change
> > > > > listen_addresses = '*'
> > > > > port = 5432
>
> > > --
> > > 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+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
>
> > --
> > Thanks,
> > Subhranath Chunder.www.subhranath.com
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment