I feel really dumb writing this, I wanted to have a mess around with databases so I just installed postgreSQL (9.1)

During the installation I am asked to provide a superuser password. I provide a password that it can use and everything gets installed.

I'm following the getting started documentation. getting started documentation and attempt to use the command createdb in cmd.exe. It asks for a password and responds with:

createuser: could not connect to database postgres: FATAL: password authentication failed for user "VanGOss"

I can access a database inside pgAdminIII with the password I originally provided at installation. So it's the command line tools not accepting the password.

I also run postgres and got this back:

Execution of PostgreSQL by a user with administrative permissions is not
The server must be started under an unprivileged user ID to prevent
possible system security compromises.  See the documentation for
more information on how to properly start the server.

I tried using createuser to make a user, again run from cmd.exe and it said its not accepting my password.

what i'm thinking is I must run my environment under a limited user, which I don't want to do. This is my home computer and I just want one account.

windows 7 64-bit 1 user account, me, admin can't past page 2 of a tutorial on running a database, kinda shameful :(

Any one know how I can make my own database? Please.

1 Answer 1


Try to add the option -U postgres to your createdb command. The error clearly states that PostgreSQL tried to execute it with the current Windows username, while you set superuser password (presumably) for user postgres.

  • Thanks dezso, this worked. I see what you mean, it used my windows account name, expecting it existed as a user. When the only user was postgres, and -U selects a new user for the command. Thanks so much. :)
    – Joseph
    Commented Jun 13, 2012 at 15:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.