Answers for "could not connect to server: connection refused is the server running on host "localhost" (::1) and accepting tcp/ip connections on port 5434?"

7

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

cd /etc/postgresql/9.x/main/
------- open file named postgresql.conf
sudo nano postgresql.conf
------- add this line to that file
listen_addresses = '*'
------- then open file named pg_hba.conf
sudo nano pg_hba.conf
------- and add this line to that file
host  all  all 0.0.0.0/0 md5
------- restart your server
sudo /etc/init.d/postgresql restart
Posted by: Guest on May-28-2020
0

connection to server at "localhost" (::1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections

FATAL:  lock file "postmaster.pid" already exists
 HINT:   Is another postmaster (PID 379) running in data directory "/usr/local/var/postgres"?
Posted by: Guest on April-01-2022

Code answers related to "could not connect to server: connection refused is the server running on host "localhost" (::1) and accepting tcp/ip connections on port 5434?"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language