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.
pgsqlwithpsql. The recent guide inclused creating a database as a step, and instead fails withcreatedb: could not connect to database template1: FATAL: password authentication failed for user. The service is always started after installing:brew services start postgresqlService `postgresql` already started, use `brew services restart postgresql` to restart.