I just installed postgresql
on a Macbook with brew install postgresql
. Then I try to psql
, but it requires password and then show
So your username probably does not exist, as the default username that ships with the db is postgres
.
Further, I was prevented from the submission of an empty password, which is blank by default for the postgres
user.
You might try
cd ~/
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
Password: YOUR_LOGIN_PWD_HERE (required for sudo)
and then to use
psql -U postgres
password: postgres
I'm not 100% sure of which SO answer I got this from, perhaps here. Hope this helps.