Various guides show how to install/start postgres on mac using brew:
brew install postgresql
brew services start postgresql
However the usual next step, to connect with an empty password, fails.
psql postgres
Password for user <>:
psql: fe_sendauth: no password supplied
How do you connect to a newly created postgres 11 database on mac in 2019?
Prior research:
It looks like the default password used to be empty.
The official wiki guide, and Recent/fairly recent tutorials suggest psql<databasename> should just work, but these fail with the above errors.
An older guide and newer SO answer have you switch user before using psql, which gives the same error as above.
I had the same problem with a brew installed Postgres@14. The following got me into the DB shell:
psql -h localhost -d postgres
login on your machine in a shell as „root“
change to the „postgres“ user (no password required because you are root):
$ su - postgres
$ psql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With