Re: How Using new created DB

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: LJJGIS <ljjgis(at)yahoo(dot)com(dot)cn>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How Using new created DB
Date: 2006-03-24 21:26:52
Message-ID: 1143235612.3625.23.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-24 21:32:40 Re: When does a check constraint execute?
Previous Message Scott Marlowe 2006-03-24 20:53:21 Re: Advantages of PostgreSQL over MySQL 5.0