[OSM-dev] Mapnik: Problems setting up Postgresql

Raphaël Jacquot sxpert at sxpert.org
Tue Mar 6 22:14:42 GMT 2007


Nick Whitelegg wrote:
> Hello Artem (and anyone else),
> 
> Am trying to set up the postgresql database for Mapnik rendering. Following 
> the instructions on the wiki, I have got to this stage:
> 
> createdb -Upostgres -EUNICODE <DBNAME>
> 
> Even if I am root, I get an "access denied" message.

yes, this is normal.

you should

# su - postgres
$ createdb -EUNICODE <DBNAME>

in that case the database will belong to user postgres (may not be what 
you want)

as an alternative you can

$ su
# su - postgres
$ createuser <your usual username>
[answer the questions here with yes]
$ exit
# exit
$ createdb -EUNICODE <DBNAME>

in that case the database will belong to your usual unix user

> I have edited pg-ident.conf to look like this:
> 
> # MAPNAME     IDENT-USERNAME    PG-USERNAME
> map1          root              postgres
> map1          nick              postgres

that's a bad idea

> The other file , pg-hba.conf seems harder to understand. Mine looks like this:
> 
> # Database administrative login by UNIX sockets
> local   all         postgres                          ident sameuser
> 
> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
> 
> # "local" is for Unix domain socket connections only
> local   all         all                               ident sameuser
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> # IPv6 local connections:
> host    all         all         ::1/128               md5
> 
> What do I need to change to get it to work?
> This is postgresql 8.1, Debian etch.

you didn't need to change anything :D

> Thanks,
> Nick

Raphael

> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
> 





More information about the dev mailing list