An open-source object-relational database management system.
Install
Config
Config file can be found with:
Itβs default location should be /var/lib/pgsql/data/pg_hba.conf
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.
Example records forms:
local DATABASE USER METHOD [OPTIONS]
host DATABASE USER ADDRESS METHOD [OPTIONS]
hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS]
hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS]
First field is the connection type:
local
- Unix-domain sockethost
- TCP/IP socket (encrypted/not encrypted)hostssl
- TCP/IP socket that is SSL-encryptedhostnossl
- TCP/IP socket, not SSL encryptedhostgssenc
- TCP/IP socket, GSSAPI-encryptedhostnogssenc
- TCP/IP socket, not GSSAPI-encrypted
DATABASE can be:
all
(does not matchreplication
)sameuser
samerole
replication
- a database names
- comma separated list of values above
USER can be:
all
- user name
- group name prefixed with
+
- comma separated list of values above
To include names from a separate file use @file_name
prefix.
ADDRESS specifies the set of hosts the record matches. It can be:
- host name
- IP address in a CIDR notation
METHOD can be:
trust
reject
md5
- encrypted passwordpassword
- in clear text, non-preferablescram-sha-256
- encrypted passwordgss
sspi
ident
peer
pam
ldap
radius
cert
Database and user names with special symbols must be quoted.
Configuration is read of server startup and when SIGHUP
signal received (pg_ctl reload
, SELECT pg_reload_conf()
).
Fix pgadmin ident authentication failed for user
https://www.cyberciti.biz/faq/psql-fatal-ident-authentication-failed-for-user/