mac bigSur 11.6.4, zsh
Issue: I am trying to start postgres server via command "postgres". I am getting the following error "zsh command not found postres"
I installed postgres@12 via homebrew. I see postgresql@12 in /usr/local/var/
The only things in /usr/local/var are: homebrew, log, and postgresql@12
My .zshrc file looks like this as it stands
export PATH=/usr/local/bin:$PATH
source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/opt/chruby/share/chruby/auto.sh
export PGDATA=/usr/local/var/postgresql@12
export PGHOST=/tmp
Does anyone know if I am missing something?
CodePudding user response:
You need to use homebrew's services
command.
This will list available services (in case you have multiple postgres versions installed) and their statuses:
brew services
To start a service, run this command:
brew services start postgresql@12