^D
to exit psql, BTW.)/etc/postgresql/11/main/pg_hba.conf
:myapp
and a user called myapp_user
,with the password s3cr3t
. The database is empty, and will be owned by the usermyapp_user
, which means that by connecting as myapp_user
the client will beable to do execute most all DDL/DML commands.pg_hba.conf
to add lines like so:5432
is bound to 127.0.0.1
. It means anyattempt to connect to the postgresql server from outside the machine will be refused.We can try hitting the port 5432
by using telnet.postgresql.conf
. Indifferent systems it is located at different place. I usually search forit.postgresql.conf
file and replace line5432
has changed to 0.0.0.0
.pg_hba.conf
and add following entry at thevery end.