0

In my sample project, I am trying to create postgre database. While running the rake db:create, I am getting some strange message and unable to create the database.

user1234@ubuntu:~/Development/example$ psql -d postgres
psql: FATAL:  role "user1234" does not exist
user1234@ubuntu:~/Development/example$ psql -d postgres -U postgres
Password for user postgres: 
psql: fe_sendauth: no password supplied
user1234@ubuntu:~/Development/example$ psql -d postgres -U postgres
Password for user postgres: 
psql: FATAL:  password authentication failed for user "postgres"

Please suggest me, what will be my next step to resolve this issue and to make my sample project in running state.

Rubyist
  • 6,486
  • 10
  • 51
  • 86

2 Answers2

2

Looks like you only set up peer identification in your pg_haba.conf file.

Try in your Ubuntu shell

sudo su postgres
psql

More information under these related questions:
PostgreSQL error: Fatal: role "username" does not exist
pgadmin gives me the error: no password supplied
Run batch file with psql command without password

Community
  • 1
  • 1
Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
  • Thanks a lot for your valuable feedback. But after a lot of struggle, I made one more user and added to config.yml now it is working fine. – Rubyist May 29 '13 at 08:50
0

After a long fight and lot of RnD, I have decided to create one more user for postgres from pgAdmin.

FirstImage- Add New User

Second Image - Add Password

Rubyist
  • 6,486
  • 10
  • 51
  • 86