I have the latest versions of PostgreSQL and its GUI-frontend, pgAdmin, installed.
When I try to register a new server a fatal error appears when pgAdmin tries to connect to the newly created server – password authentication failed for user "postgres".
I'm using a non-default port which was properly updated in the postgresql.conf file so I don't believe that is causing problems (restarted postgres too, as it so politely asks you to).
postgres processes are running properly:
Here you can examine the configuration settings I am using to register the server:
I've tried a few passwords, including my root password but none of them appear to be working. Maybe the user has to be created separately?
This is the first time I'm encountering anything besides SQL Server or Access so please bear with me if the question and its possible solution seem far too trivial.
I'm running Linux Mint 15, 32-bit.
I will provided additional information, if needed of course.
Best Answer
You need to enter the password of the database user, not the OS user. The "root password" is not applicable. Do you know the password of the database user
postgres
?Most systems are set up allowing peer authentication for local connections, meaning a system user can log into the database with a database user of the same name without password.
localhost
is not a local connection. Its privileges are determined byhost
entries in yourpg_hba.conf
file.Since you seem to be running Postgres and pgAdmin on the same server, I suggest you try a local connection without password. Quoting the pgAdmin manual:
Bold emphasis mine.
Of course, you have to run pgAdmin as the system user
postgres
for this to work.This related answer on SO has a lot more details and links.