NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi, I have just downloaded osm2pgsql for Windows and I am trying to execute:

osm2pgsql -s -U postgres -d gisdb C:\Users\MyUser\Documents\data.osm

However, I am gettint this error:

osm2pgsql SVN version 0.83.0 (64bit id space)

Error: Connection to database failed: could not connect to server: No such file or directory

  Is the server running locally and accepting connections on Unix domain socket "/tmp/.sPGSQL.5432"?

What is the problem?

Thanks!

asked 22 Apr '14, 22:39

AnderOSM's gravatar image

AnderOSM
714411
accept rate: 0%


Try the additional options --port 5432 and --host localhost to force osm2pgsql to make a TCP connection instead of using the Unix Domain Socket.

permanent link

answered 22 Apr '14, 23:38

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

I also needed -W so that the command line asks for my database user's password.

(23 Apr '14, 12:00) AnderOSM

Are you sure your postgres server is running ?

permanent link

answered 22 Apr '14, 23:31

exxos's gravatar image

exxos
81338
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263

question asked: 22 Apr '14, 22:39

question was seen: 4,190 times

last updated: 23 Apr '14, 12:00

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum