[OSM-dev] Permission denied errors connecting to postgres from Mapnik
nickblack1 at gmail.com
Thu Mar 8 10:27:51 GMT 2007
Can you connect to postgres using psql:
# psql freemap -U nick -W -h localhost -p 5432
If you get the same error connecting from the psql client, its
probably a problem with pg_hba.conf. Mine is set like:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
So any machines on my local network can connect with an md5 encrypted
password. You set the password for the user at account creation time
create user foo with encrypted password 'blah'.
On 3/7/07, Nick Whitelegg <nick at hogweed.org> wrote:
> Hello Artem and everyone,
> Sorry... yet another problem :-( I'm now trying to connect to the postgis
> database from Mapnik.
> The postgresql user "nick" doesn't have a password and the postgresql server
> is running on port 5432. I could add all the OSM records in to the database
> successfully. In the mapnik xml file I have layers such as:
> <Layer name="roads" status="on">
> <Parameter name="type">postgis</Parameter>
> <Parameter name="host">localhost</Parameter>
> <Parameter name="port">5432</Parameter>
> <Parameter name="user">nick</Parameter>
> <Parameter name="dbname">freemap</Parameter>
> <Parameter name="table">(select
> as length from planet_osm where waterway IS NULL and leisure IS NULL and
> landuse IS NULL) as roads</Parameter>
> Running this from mapnik gives me an access denied error:
> connection to host=localhost port=5432 dbname=freemap user=nick password=
> connect_timeout=4 failed
> FATAL: password authentication failed for user "nick"
> I guess I must have missed something out. Any pointers here?
> Changing "localhost" for "free-map.org.uk" is even worse.. it reports that it
> can't detect a database server running.
> dev mailing list
> dev at openstreetmap.org
More information about the dev