From: | Dave Page <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | Phillip Criley <pfcriley(at)pcwright(dot)com>, pgAdmin Support <pgadmin-support(at)postgresql(dot)org> |
Subject: | Re: Create database/password problem |
Date: | 2006-08-25 19:03:08 |
Message-ID: | C11507FC.12655%dpage@vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
On 25/8/06 19:44, "Phillip Criley" <pfcriley(at)pcwright(dot)com> wrote:
>
> I was in root and used the add/remove programs to install. I just tried
> postgres as the user but then I get:
>
> An error has occured:
>
> Error connecting to the server: FATAL: password authentication failed
> for user "postgres"
>
> I tried different passwords with the same result. Obviously, I missed a
> few things as clicking
> help causes the pgadmin to close.
OK, it's probably easiest to just reset the password and start again.
1) Please edit pg_hba.conf, and set the line for 127.0.0.1/32 to trust
authentication.
2) Restart the PostgreSQL service form the Services snapin to ensure the
change takes effect.
3) Open C:\Program Files\PostgreSQL\8.1\data\global\pg_auth in a text
editor. The superuser username should be the first item on what I would
expect to be the only line. The path above assumes a default installation of
course - adjust to suit if required. DO NOT change the file at all.
4) Open the PostgreSQL Command prompt from the start menu, and type the
following command:
psql -h 127.0.0.1 -U <username from step 3> postgres
The should connect you to the postgres database as your superuser, without a
password.
5) Issue the following SQL:
ALTER USER "<username from step 3>" WITH PASSWORD 'newpassword';
To change the password. Then exit psql (\q).
6) Change the pg_hba.conf line back to md5 auth, and restart the server.
7) Login with pgAdmin using the userid from step 3, and the new password.
Regards, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | Vivek Khera | 2006-08-29 14:47:06 | update using OID instead of PKEY? |
Previous Message | Dave Page | 2006-08-25 16:24:07 | Re: Create database/password problem |