Postgres psql: FATAL: Peer authentication failed for user &a
In pg_hba.conf,thefirst matchcounts.Per documentation:
编辑pg_hba.conf # vim /var/lib/pgsql/9.6/data/pg_hba.conf # PostgreSQL Client Authentication Configuration File # =================================================== # # Refer to the "Client Authentication" section in the PostgreSQL # documentation for a complete description of this file. A short # synopsis follows. # This file controls: which hosts are allowed to connect,how clients # are authenticated,which PostgreSQL user names they can use,which # databases they can access. Records take one of these forms: # local DATABASE USER METHOD [OPTIONS] # host DATABASE USER ADDRESS METHOD [OPTIONS] # hostssl DATABASE USER ADDRESS METHOD [OPTIONS] # hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] local all xxx trust # /etc/init.d/postgresql-9.6 reload 重新登录 # psql -U xxx -d msolution.cn_development psql (9.6.1) Type "help" for help. xxx=> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |