0
votes

I'm following the geodjango tutorial here:

https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#introduction

I successfully completed the installation/setup.

When I try entering the first command at the command line:

createdb -T template_postgis geodjango

I get this error message:

createdb: could not connect to database postgres: FATAL: password authentication failed for user "mss"

mss is my windows username. Should I be using the password I entered when I installed postgresql? The default username during the install was postgres... so in that case how do I change the username?

Thanks for your help!!

(I'm on Windows XP)

1
Not a full blown answer but a hint: In the referenced tutorial su and sudo are used for executing shell commands with other user rights - postgres in this case. AFAIK on Windows this can be done with the runas command.A.H.

1 Answers

1
votes

so in that case how do I change the username?

Use the -U switch as documented in the manual:

createdb -U postgres -T template_postgis geodjango

The -U switch is used in all Postgres command line applications to specify the username. You will also need this for psql to run interactive queries (unless you use a different SQL tool)