From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Stephen Rasku <postgres(at)srasku(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: .pgpass being ignored |
Date: | 2013-06-21 22:41:28 |
Message-ID: | 51C4D698.20304@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 06/21/2013 03:25 PM, Stephen Rasku wrote:
> I am trying to write a script that will create and populate a
> database. I don't want to enter a password every time so I want to
> use a .pgpass file. It has the correct permissions:
>
> $ ls -l $PGPASSFILE
> -rw------- 1 Stephen staff 43 21 Jun 14:48 /Users/Stephen/.pgpass
>
> However, when I call createdb, it fails:
>
> $ createdb -h 192.168.1.4 -U postgres --no-password JobSearch
> createdb: could not connect to database postgres: fe_sendauth: no
> password supplied
>
> This is the contents of my .pgpass file:
>
> 192.168.1.4:5432:DatabaseName:postgres:thisIsTheCorrectPassword
>
> If I omit the --no-password option it will prompt me for a password
> and the command will succeed. I am using 9.0.10 from MacPorts.
>
> What am I doing wrong?
First are you running the script from the location with .pgpass?
Second you are doing a createdb, not sure how Postgres handles using
.pgpass with database that does not exist yet? Might want to try a '*'
in the database name field or since it looks like it is trying to
connect to the postgres database, use that as the database name.
>
> ...Stephen
>
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Rasku | 2013-06-21 23:03:21 | Re: .pgpass being ignored |
Previous Message | Raymond O'Donnell | 2013-06-21 22:33:30 | Re: .pgpass being ignored |