Re: How Using new created DB - Mailing list pgsql-general

From Scott Marlowe
Subject Re: How Using new created DB
Date
Msg-id 1143235612.3625.23.camel@state.g2switchworks.com
Whole thread Raw
In response to How Using new created DB  (LJJGIS <ljjgis@yahoo.com.cn>)
List pgsql-general
On Thu, 2006-03-23 at 20:18, LJJGIS wrote:
> Connect to postgres with
>
> c:\>psql.exe  -h localhost -p 5432 postgres "postgres"
>
> And then
>    postgres=# create database mydb
>
> Then I try to connect to "mydb" with
>
>   C:\> psql mydb
> After try many password, include postgres password and OS user password
> report ** psql: FATAL:  password authentication failed for user
> "Administrator" **
> OR
>   C:\>psql -h localhost -p 5432 mydb "mydb"
> After try many password, include postgres password and OS user password
> report ** psql: FATAL:  password authentication failed for user "mydb"  **
>
> Could someone here help to illustrate how to connect to a newly created
> database

Is this on the same machines(s)?  I.e. are you running psql on the same
machine (client) against he same machine (server) for both examples?

Also, note that in the first example, you're connecting via tcp/ip with
-h localhost -p 5432, but in the second example you're not specifying
those things.  Have you tried changing ONLY the database name and
specifying the username postgres?

PostgreSQL has an internal set of names it uses.  They don't come from
the OS.  You need to use the "create user" and "alter user" commands to
create and change those.

It's all in the docs at:
http://www.postgresql.org/docs/8.1/static/sql-createuser.html

pgsql-general by date:

Previous
From:
Date:
Subject: When does a check constraint execute?
Next
From: Tom Lane
Date:
Subject: Re: When does a check constraint execute?