vim /etc/postgresql/9.6/main/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 connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
vim /etc/postgresql/9.6/main/postgresql.conf
#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5433 # (change requires restart)
port bývá standardně 5432, Debian/Ubuntu má jiný
listen address je localhost, i když je v cfg zakomentovaný
su postgres -c psql
postgres=# \l
CREATE ROLE blackconv WITH LOGIN PASSWORD 'blackconv';
select * from pg_roles;
CREATE DATABASE blackconv OWNER blackconv;
psql -U blackconv -d blackconv -h localhost -p 5433