createdb: could not connect to database template1: FATAL: password authentication failed for user

Viewed 22819

Installed Postgresql via Homebrew. I wanted to create a new database after unzipping a ".tar". But I have this problem.

Michael-Adelekes-MacBook:wikiful madeleke13$ sudo su postgres -c 'createuser-P--superuser madeleke13'

bash: createuser-P--superuser: command not found

Michael-Adelekes-MacBook:wikiful madeleke13$ sudo su postgres -c 'createuser-P-superuser madeleke13'

bash: createuser-P-superuser: command not found

Michael-Adelekes-MacBook:wikiful madeleke13$ sudo su postgres -c 'createuser -P --superuser madelek13'

Password: Enter password for new role: Enter it again:

Michael-Adelekes-MacBook:wikiful madeleke13$ createdb -T template0

newdbPassword:
Password:

createdb: could not connect to database template1: FATAL: password authentication failed for user "madeleke13"

Michael-Adelekes-MacBook:wikiful madeleke13$

I am not understanding why I'm unable to authenticate my username when I have had no problems before.

1 Answers
Related