psql: could not connect to server

If you come across an error like this in POSTGRESQL:

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

Then, use the following command to solve the issue:
sudo chmod a+w /var/run/postgresql


Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Find duplicate records in ServiceNow