Re: Can't connect to socket in Debian distribution

From: "KEVIN ZEMBOWER" <KZEMBOWER(at)jhuccp(dot)org>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Can't connect to socket in Debian distribution
Date: 2002-11-27 20:10:22
Message-ID: sde4e074.039@ccp2.jhuccp.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thank you, Tom, for your suggestions. I think it moved me in the right direction, but I'm still not there yet.

You are right about the '-p' option. It gets so confusing to me switching back and forth from MySQL to PostgreSQL. In MySQL, '-p' is how you prompt for the password. In PostgreSQL, it's '-W'. However, now, running as root, I just get:
www2:/home/kevinz# psql -W mnogosearch mnogosearch
Password:
psql: FATAL 1: IDENT authentication failed for user "mnogosearch"

www2:/home/kevinz# psql -W -U mnogosearch mnogosearch
Password:
psql: FATAL 1: IDENT authentication failed for user "mnogosearch"

Just before I tried this, I used the ALTER USER command to set the password for mnogosearch to something I was sure of, so I'm pretty confident in that.

When I 'su mnogosearch' I can then 'psql mnogosearch' , never get asked for a password, and get into psql immediately and without a problem.

One thing I don't understand is the difference between:
psql -W <dbname> <username>
and:
psql -W -U <username> <dbname>
My reference book leads me to believe that there's no difference. Is there?

Thanks, again, Tom.

-Kevin

>>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 11/27/02 01:52PM >>>
"KEVIN ZEMBOWER" <KZEMBOWER(at)jhuccp(dot)org> writes:
> When I try to run psql as root, I get this error:
> www2:/etc/postgresql# psql -p mnogosearch mnogosearch
> 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.0"?

"-p" is probably not what you want here. It looks like the code is
failing to notice that the argument of -p doesn't look like an integer...

regards, tom lane

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-11-27 20:30:53 Re: Can't connect to socket in Debian distribution
Previous Message Tom Lane 2002-11-27 18:52:51 Re: Can't connect to socket in Debian distribution