When i'm trying to run psql, is says:
psql --version
psql (PostgreSQL) 9.3.12
psql
psql: FATAL: Peer authentication failed for user "testuser"
Here is my pg_hba.conf:
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket coections only
local all all peer map=testmap
# IPv4 local coections:
host all all 127.0.0.1/32 md5
# IPv6 local coections:
host all all ::1/128 md5
Here is my pg_ident.conf:
# MAPNAME SYSTEM-USERNAME PG-USERNAME
testmap testuser postgres
And postgresql.conf:
data_directory = '/var/lib/postgresql/9.3/main'
hba_file = '/etc/postgresql/9.3/main/pg_hba.conf'
ident_file = '/etc/postgresql/9.3/main/pg_ident.conf'
exteal_pid_file = '/var/run/postgresql/9.3-main.pid'
listen_addresses = '*'
port = 5432
max_coections = 100
unix_socket_directories = '/var/run/postgresql'
ssl = true
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
shared_buffers = 128MB
log_line_prefix = '%t '
log_timezone = 'UTC'
datestyle = 'iso, mdy'
timezone = 'UTC'
lc_messages = 'C'
lc_monetary = 'C'
lc_numeric = 'C'
lc_time = 'C'
default_text_search_config = 'pg_catalog.english'
PostgreSQL Version: 9.3.12
What i'm doing wrong?
برچسب:
نویسنده: استخدام کار