0

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. Commented Oct 8, 2011 at 21:31

1 Answer 1

1

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)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.