Reputation: 512
I installed postgresql using brew a while ago, but I haven't found a solution that it would start automatically on the startup. Do you have any solution?
this is what I see when I try to connect to local database.
This is $ brew services list
output (single line)
postgresql started root /Library/LaunchDaemons/homebrew.mxcl.postgresql.plist
When installed, I followed instructions to start it now and after restart at login
Only workaround is to run this line
pg_ctl -D /usr/local/var/postgres start
which is quite inconvenient since I have to look it up in info page or assign to alias which I can't remember each time when I restart the computer.
Upvotes: 5
Views: 6477
Reputation: 240
I realized most of these issues when my mac shutdown. To solve this, you may try this:
postgres -D /usr/local/var/postgres
kill -9 <PID>
brew services restart postgres
. That should do it for most of the casesUpvotes: 3