I have had problems with postgres after I replaced my original postgres installation with a homebrew installation.
After boot, if I issue the psql command, I get:
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
If I run:
ps auxwww | grep postgres
I get this weird output:
paulcowan 2829 0.0 0.0 2432784 540 s000 R+ 9:17am 0:00.00 grep postgres
And if I run:
ps -ef | grep postgres
I get:
501 2842 1040 0 9:19am ttys000 0:00.00 grep postgres
If I then run:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Everything starts.
I have tried to get postgres to start on login and I enter this command:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Followed by this:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
I get this error:
launchctl: Couldn't stat("/Users/paulcowan/Library/LaunchAgents/homebrew.mxcl.postgresql.plist"): No such file or directory nothing found to load