I'm on Ubuntu and trying to connect to postgresql by any means, i.e. running psql
throws:
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"?
sudo /etc/init.d/postgresql restart
fixes the problem, however, once I restart the computer, I always have to type the line into terminal all over again. Is there any way to fix this problem, so I don't have to type the line?
Do you kill the server before restarting the computer? If you're just restarting the computer, or if the battery dies while your server is running, you more than likely will run into this issue.