Creating symlink for Postgres
Posted
by
Edwin
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Edwin
Published on 2012-04-14T04:29:15Z
Indexed on
2012/04/14
5:40 UTC
Read the original article
Hit count: 330
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.
© Ask Ubuntu or respective owner