Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Password?

12 views
Skip to first unread message

Peter Percival

unread,
Feb 3, 2018, 10:56:50 AM2/3/18
to
When I installed PostgreSQL it asked me to supply a password, which I
did. My first use of the product was to issue this command:

createdb books

I was asked for a password and I duly typed the one I supplied. It was
rejected. Any thoughts?

Peter Percival

unread,
Feb 3, 2018, 3:15:35 PM2/3/18
to
It maybe that I need to find .pgpass. If so, where is it?

Laurenz Albe

unread,
Feb 5, 2018, 2:33:46 PM2/5/18
to
.pgpass is in your home directory.

I guess from your user agent that you are on Windows.

Was the password you entered for an operating system user or
for a database user?

There is a simple way to get out of this situation:
Edit pg_hba.conf and change the authentication method to
"trust" for all local and localhost lines. Then restart
PostgreSQL.

After that, neither "createdb" nor "psql" will ask a password
if you are on the same machine, and you can use the psql
command "\password" to change your password.
0 new messages