How to install PostgreSQL 15 on macOS using Homebrew

Поділитися
Вставка
  • Опубліковано 6 вер 2024

КОМЕНТАРІ • 11

  • @zigmoos
    @zigmoos Рік тому

    Muzafar Ali, I like your terminal decorations... are those from one of the oh-my-zsh themes?

  • @itsvikas-ei8hn
    @itsvikas-ei8hn Рік тому

    please make a video on how data load into the terminal in mac

    • @zigmoos
      @zigmoos Рік тому

      What kind of data are you wanting to see loaded?
      - CSV?
      - Pipe delimited?

  • @ThomazMartinez
    @ThomazMartinez Рік тому

    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?

    • @zigmoos
      @zigmoos Рік тому

      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

    • @zigmoos
      @zigmoos Рік тому

      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

    • @zigmoos
      @zigmoos Рік тому +1

      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 ;

  • @obipolare
    @obipolare Рік тому

    thanks!!

  • @Summer-7
    @Summer-7 Рік тому

    i could not open the servers it gave me an ERROR for the password ):

    • @muzafar
      @muzafar  Рік тому

      Did you try `psql postgres`?

  • @ikerborja1082
    @ikerborja1082 Рік тому +1

    really? a 15 min video...