Re: Newbie's question: How can I connect to my postgresql-server?

From: Ricky Tompu Breaky <ricky(dot)breaky(at)uni(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Newbie's question: How can I connect to my postgresql-server?
Date: 2009-09-24 19:47:23
Message-ID: 20090925024723.1adc5f10@uni.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, 24 Sep 2009 19:57:55 +0100
Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:

> On Fri, Sep 25, 2009 at 01:47:03AM +0700, Ricky Tompu Breaky wrote:
> > I am still new in PostgreSQL. Usually I use MySQL on OpenSuSE.
>
> Welcome over, PG is *normally* much better behaved than this and
> generally gives very good error messages.
>
> > postgres(at)sussy:/root> createuser -D -p ricky
>
> I don't think you want to be passing "-p" here; it's saying to use
> "ricky" as the port number, which fails (sounds like a bug if it
> doesn't complain about this) giving a port number of zero, which is
> why you see this:
>
> > connections on Unix domain socket "/tmp/.s.PGSQL.0"?
>
> the ".0" is normally something like ".5432".
>
> Maybe you want "-P" to be asking for the password?
>

Dear Sam.

Thank you very much for your help. You've solved my problem.

But I still can not login to my PostgreSQL-Server.

Here what I've done:
"
postgres(at)sussy:/root> createuser -D -P ricky
could not change directory to "/root"
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y
postgres(at)sussy:/root>

sussy:~ # rcpostgresql restart
Shutting down PostgreSQLServer angehalten
done
Starting PostgreSQL
done

sussy:~ # psql -U ricky -W
Password for user ricky:
psql: FATAL: Ident-Authentifizierung für Benutzer »ricky«
fehlgeschlagen (I translate it: psql: FATAL: Ident-Authentication
for user »ricky« failed)
sussy:~ #
".

I'm sure that I used the correct password as "createuser" the
account of 'ricky'.

Please keep telling me.

Thank you very much in advance.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-09-24 19:51:40 libpq port number handling
Previous Message Rob Marjot 2009-09-24 19:23:35 Re: generic modelling of data models; enforcing constraints dynamically...

Browse pgsql-hackers by date

  From Date Subject
Next Message Sam Mason 2009-09-24 19:51:40 libpq port number handling
Previous Message Josh Berkus 2009-09-24 19:23:05 Re: Join optimization for inheritance tables