On MacOS Ventura 13.2.1, my database got installed to /opt/homebrew/var/postgresql\@15/. Unfortunately, psql is not in my path with the default homebrew install from: brew install postgresql@15
But, I can see using the brew info command what I need to find out the path to the Postgres binaries is at /opt/homebrew/opt/postgresql@15/bin/. brew -v services info postgresql@15 postgresql@15 (homebrew.mxcl.postgresql@15) Running: ✔ Loaded: ✔ Schedulable: ✘ User: moo PID: 29593 File: /Users/moo/Library/LaunchAgents/homebrew.mxcl.postgresql@15.plist ✔ Command: /opt/homebrew/opt/postgresql@15/bin/postgres -D /opt/homebrew/var/postgresql@15 Working directory: /opt/homebrew Log: /opt/homebrew/var/log/postgresql@15.log Error log: /opt/homebrew/var/log/postgresql@15.log
If your homebrew installed into /opt/homebrew like mine did, this will add the Postgres binaries to your paths for bash and zsh (I use both sometimes): echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.bashrc ; echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc ;
Muzafar Ali, I like your terminal decorations... are those from one of the oh-my-zsh themes?
please make a video on how data load into the terminal in mac
What kind of data are you wanting to see loaded?
- CSV?
- Pipe delimited?
But i dont have the dir usr/local/var but i can run psql postgres so i'm confused where are my db's stored?
On MacOS Ventura 13.2.1, my database got installed to /opt/homebrew/var/postgresql\@15/.
Unfortunately, psql is not in my path with the default homebrew install from:
brew install postgresql@15
But, I can see using the brew info command what I need to find out the path to the Postgres binaries is at /opt/homebrew/opt/postgresql@15/bin/.
brew -v services info postgresql@15
postgresql@15 (homebrew.mxcl.postgresql@15)
Running: ✔
Loaded: ✔
Schedulable: ✘
User: moo
PID: 29593
File: /Users/moo/Library/LaunchAgents/homebrew.mxcl.postgresql@15.plist ✔
Command: /opt/homebrew/opt/postgresql@15/bin/postgres -D /opt/homebrew/var/postgresql@15
Working directory: /opt/homebrew
Log: /opt/homebrew/var/log/postgresql@15.log
Error log: /opt/homebrew/var/log/postgresql@15.log
If your homebrew installed into /opt/homebrew like mine did, this will add the Postgres binaries to your paths for bash and zsh (I use both sometimes):
echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.bashrc ;
echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc ;
thanks!!
i could not open the servers it gave me an ERROR for the password ):
Did you try `psql postgres`?
really? a 15 min video...