I want to use the preinstalled postgresql on my local machine (mac os 10.7.5) when I run which psql , I find it (in /usr/bin/psql ) but then I run
pg_ctl -D /usr/bin/psql -l /usr/bin/psql/server.log start
leads to:
-bash: pg_ctl: command not found
How can I run / use my postgresql database? Do I need to install it (for example, using Homebrew), or can I use the pre-installed on my Mac? I also tried using the initdb command ( initdb /usr/bin/psql -E utf8 ) and also go to the same message: -bash: initdb: command not found .
Also, is this psql the same as postgres ? (I tried which postgres and got nothing)
Update: I use psql commands on the command line, but I get the following message (e.g. for psql -l and psql -a ):
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
source share