Answer the question
In order to leave comments, you need to log in
How to set up Postgesql 9.3?
Hello
Tell me how to fix the error:
CentOS 6.5 system, installed Postgresql 9.3 from yum.pgrpms.org repository.
Created a user, created a database, assigned this database to the user.
When running rake db:migrate, as well as in the logs, the following message often appears:
"PG::ConnectionBad: IMPORTANT: user "centi_user" is not authenticated (Peer)"
Here's how to fix it without editing pg_hba.conf, setting from Peer to Trust ? The user local and a DB different names.
Answer the question
In order to leave comments, you need to log in
You need to create a PostgreSQL user with the same username as your CentOS user in order to pass peer authentication. Specify the same user in database.yml.
Try to get acquainted with tynts , it may lead to an understanding of what the problem is.
# grep -vE "^#|^$" pg_hba.conf
local all all peer map=mymap
# grep -vE "^#|^$" pg_ident.conf
mymap lesovsky postgres
$ whoami
lesovsky
$ psql -U postgres
psql (9.3.4)
Type "help" for help.
postgres=#
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question