Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4527

Could not connect to PostgreSql Server (computer) from a client (Raspberry PI)

$
0
0

I followed the instructions as: https://ubuntu.com/server/docs/databases-postgresqlThis is what I did:

Postgresql-server (On my Ubuntu desktop computer)

# Installed the Postgresql server # Went to the sudo nano /etc/postgresql/14/main/pg_hba.conf # entered following line at end: # My understanding of below line is allow the connection to the  # this ubuntu computer (10.1.2.3) from a # remote device with ip 10.1.2.4 with user postgreshostssl template1       postgres        10.1.2.4            scram-sha-256# This device ip on which Postgresql server is sitting: 10.1.2.3

Postgresql-client (On the remote Raspberry PI device) (ip: 10.1.2.4):This is what I did:

# Install Postgresql-client # access the Postgresql-server as psql --host 10.1.2.3 --username postgres --password --dbname template1

Present output on the Postgresql-client:

psql error: could not connect to server: connection refused             Is the server running on host 10.1.2.3 and accepting              TCP/IP connections on port 5432?

First time I heard about this port 5432. I would like to know what is wrong and how to rectify it?

Update:

enter image description here

enter image description here

enter image description here

enter image description here


Viewing all articles
Browse latest Browse all 4527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>