Search code examples
databasepostgresqlconsolesu

su postgres: Sorry?


i have a problem with my postgreSQL setup on my new Mac OSX Lion machine.

I can't seem to connect to the service

$ createuser -a -d _postgres
Password: 
createuser: could not connect to database postgres: FATAL:  password authentication failed for user 

I have no chance to find the correct password. Any idea what could that be. I have the default setup with a localhost server. The same happens when I try to connect via pgAdmin.

$ su postgres
Password:
su: Sorry

I have no chance to find out what's wrong?


Solution

  • try this:

    $ sudo su postgres
    

    And specify your own password.