"Phoenix assumes that our PostgreSQL database will have a 'postgres' user account with the correct permissions and a password of 'postgres'. If that isn't the case, please see the instructions for the ecto.create mix task."
Alternatively, just edit the .exs
files in config/
.
On NetBSD the default PostgreSQL user is called pgsql
. Rather than add yet another user to PostgreSQL you can just edit the Phoenix config files. I pulled out the username and password details from config/dev.exs
, config/prod.secret.exs
and config/test.exs
and added this to the top of config/config.exs
instead (just after use Mix.Config
):
# Configures the database
config :hello_phoenix, HelloPhoenix.Repo, adaptor: Ecto.Adaptors.Postgres,
username: "pgsql",
password: "pgsql"
This, for example, is what remained in config/test.exs
:
# Configure your database
config :hello_phoenix, HelloPhoenix.Repo,
adapter: Ecto.Adapters.Postgres,
database: "hello_phoenix_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox