Pg or Postgresql Shows ConnectionBad could not connect to server Error

Hey Guys if you are not familiar with Postgresql or PG and you got (Pg or Postgresql Shows ConnectionBad could not connect to server Error) this kind of error

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Extracted source (around line #651):
649
650
651
652
653
654
              
# connected server's characteristics.
def connect
@connection = PGconn.connect(@connection_parameters)
# Money type has a fixed precision of 10 in PostgreSQL 8.2 and below, and as of
# PostgreSQL 8.3 it has a fixed precision of 19. PostgreSQLColumn.extract_precision
No Need to Worry,

Had a similar problem; a pid file was blocking postgres from starting up. Go to your terminal and for fix it Just paste this Code:

rm /usr/local/var/postgres/postmaster.pid
and then all is well.

Comments

  1. THANK YOU! been trying to figure that one out for a bit.

    ReplyDelete

Post a Comment