On 25/8/06 19:44, "Phillip Criley" <[EMAIL PROTECTED]> 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.


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to