start postgresql mac code example
Example 1: how-can-i-start-postgresql-server-on-mac-os-x
If you want to manually start and stop PostgreSQL (installed via Homebrew), the easiest way is:
brew services start postgresql
and
brew services stop postgresql
If you have a specific version, make sure to suffix the version. For example:
brew services start postgresql@10
Example 2: postgres install mac
$ brew install postgresql
Example 3: how to open postgresql in mac
brew services start postgresqlpsql postgres
Example 4: run postgres locally
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Example 5: can't connect to postgresql mac os
rm -f /usr/local/var/postgres/postmaster.pid
brew services restart postgresql
Example 6: how to open postgresql in mac
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"