Postgres

Postgres.app

Postgres with Homebrew

brew install postgresql@17
brew services start postgresql@17
brew services list
psql

If you can’t connect, check the output of brew services list, look at the .plist file, check the ProgramArguments, run that command, and see the error it gives you

createuser shawsome
createdb -Oshawsome shawsome_development
createdb -Oshawsome shawsome_test
ALTER USER "myuser" WITH SUPERUSER; -- to create databases
ALTER USER "myuser" WITH PASSWORD 'mypassword';

(for some reason the double vs single quotes matter)

http://blog.willj.net/2011/05/31/setting-up-postgresql-for-ruby-on-rails-development-on-os-x/

\du - list users \l - list databases \connect mydbname - switch to db \dt - list tables \q - quit

psql -h host -p port -U username -d database pg_dump dbname > outfile psql dbname < outfile

Run as postgres user on Ubuntu:

sudo -i -u postgres [psql or pg_dump etc]

SUPERUSER

Seems to not be granted by default