Score:0

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

dk flag

I followed the instructions as: https://ubuntu.com/server/docs/databases-postgresql This 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 postgres
hostssl 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

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.