[mapserver-users] ogr connection to postgis problems
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Mar 25 08:40:17 PDT 2009
Jeff McKenna wrote:
> Travis Kirstine wrote:
>> I am trying to test a connection to a postgis db using ogrinfo and am
>> having difficulties. I am running the command on the same server that
>> hosts the postgis db. I checked the pg_hba.config file to see if it
>> allows local connections and everything looks OK but I still get
>> "Failure" when connecting with ogr.
>>
>> Am I missing something?
>>
>>
>> command
>> ogrinfo -ro PG:'host=server34 dbname=earth user=bob password=suruncle'
>>
>>
>
> My thoughts:
>
> - since you are on the same server, use host=127.0.0.1
> - include the port parameter (usually port=5432)
Have you try from the command line:
psql -h server34 -U bob earth
psql -h localhost -U bob earth
psql -U bob earth
Should prompt you for the password.
Only the last on will use the local socket or named pipe. If the last
one works the try:
ogrinfo -ro PG:'host= dbname=earth user=bob password=suruncle'
ogrinfo -ro PG:'dbname=earth user=bob password=suruncle'
and see if either of these work.
-Steve W
More information about the MapServer-users
mailing list