D
D
Dmitry Lebedev2014-04-03 13:46:43
PostgreSQL
Dmitry Lebedev, 2014-04-03 13:46:43

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

4 answer(s)
A
alfss, 2014-04-15
@k3NGuru

www.postgresql.org/docs/9.3/static/auth-pg-hba-con...

A
Andrew Emelianenko, 2014-04-08
@YourWest

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.

A
afiskon, 2014-04-05
@afiskon

Try to get acquainted with tynts , it may lead to an understanding of what the problem is.

A
Alexey Lesovsky, 2014-04-16
@lesovsky

# 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 question

Ask a Question

731 491 924 answers to any question