pgadmin, postgres and gogole cloud connection time out


Staff member
I followed <a href="" rel="nofollow noreferrer">this tutorial</a>.

I managed to set up everything and do exactly as it was mentioned in the tutorial.

But when I tried to connect to it using PGADMIN 4, i get connection time and out and I was never able to fix it.

then I found <a href="" rel="nofollow noreferrer">this link</a>, which has the following command:

sudo -i -u postgres

then I cans see the following message:

You are connected to database "postgres" as user "postgres" via socket in "/var/run/postgresql" at port "5432".

So I dont understand what is wrong now and when I type:
sudo nano ../../etc/postgresql/9.3/main/pg_hba.conf
to see the content of the file and I put my password, its not being accepted.

Then I restart everything by closing the window and open it again, then I can check out the file:

# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
# 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               md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres            md5
#host    replication     postgres        ::1/128                 md5
# IPv4 remote connections for the tutorial:
#host     all             all              md5
#host     all             all          md5
host     all             all             all                     md5

The last 4 lines I've added to fix the problem, but nothing yet.

What am I doing wrong? I'm looking at many tutorials, and also several pages from Stack Overflow but still nothing!