So close to having tilecache/mapnik/osm working. PSQL authentication

Hi all,

I’m attempting to get a local OSM served by Postgresql using tilecache and mapnik. I have everything set up as far as I can tell by following the various Wiki pages here. I’m running into an issue that is hopefully an easy one to solve, but it involves postgresql which is new to me (I use MySQL). I created the user for the ‘gis’ database, and imported the planet file just fine. However, when I try to access via tilecache, I get an authentication error trying to reach postgresql. Since I set up the gis database under my user account (“msherman”), and the web server is trying to connect and call as “apache”, I’m sure this is the issue. Now, in setting up the osm.xml file, I put in the proper username “msherman”, and it’s trying to use that, but I’m not sure about the password since you never really set one up in the postgresql setup! It just assumes that you run it as the account you’re logged in as… so, long story to ask, how do I set a password for my “msherman” postgresql account so I can pass that in when tilecache is trying to do its thing?


Try setting the pg_hba.conf file to “trust” mode for all users. Then the database should never demand any password from the apache user.

Hi Michael,

I is the user ‘msherman’ exsisting in the database as user in the database?

see man createuser

It is mostly better to assign a specific user for the task like osm_user something like this:

   $ createuser -P -h localhost -p 5432 -S -D -R -e osm_user

about pg_hda.conf: