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
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to