I got an error when I tried to access my database on postgresql:
sudo -i -u psquser psql psqdb
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"?
I don't know what cause the problem since before that I could access it as normal.
As this problem before, I tried to reinstall postgresql
by following this instrunction How to thoroughly purge and reinstall postgresql on ubuntu? [closed]. It took me lot of time since I have to to configured almost everything from scratch.
Is there an alternative better that I can solve this problem? Could I know what is the rootcause of this.
PS: I hosted this server on digital ocean.