I tried creating a user called postgres. I reinstalled postgres through brew
. I'm able to run it with
postgres -D /usr/local/var/postgres
when I run mix ecto.create
, I still get the error:
~/code/blog_phoenix:.mix ecto.create
** (Mix) The database for BlogPhoenix.Repo couldn't be created, reason given: psql: FATAL: role "postgres" does not exist.
~/code/blog_phoenix:.
It looks like your database installation is missing the role postgres
.
You should try to connect using the default credentials and then execute the SQL statement to create the role and its default database.
In a console run:
$ psql
then
CREATE USER postgres SUPERUSER;
CREATE DATABASE postgres WITH OWNER postgres;
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