Creating symlink for Postgres
- by Edwin
As a developer, I often ssh right into my local database, just to test my application before pushing my code.
However, I find that every time I want to access Postgres, I have to type in
postgres@ubuntu:~$ /usr/local/pgsql/bin/psql test
whereas on my work machine, all I have to do is type
postgres@ubuntu:~$ psql --dbname=test --username=user
I tried creating a symlink, which was successful, but whenever I try connecting to it through this shortcut, I get the following error message:
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"?
How do I get this to work? In case it makes any difference, I'm using a self-compiled version of the 9.1.x series.