create database - mix ecto.create - error
### Environment
- Elixir version (elixir -v): 1.3.0-dev (aec2d29)
- Phoenix version (mix deps): 1.1.4
- NodeJS version (node -v): 0.10.42
- NPM version (npm -v): 1.3.6
- Operating system: Centos 6.7 32-bit
### Expected behavior
$ mix ecto.create
The database for HelloPhoenix.Repo has been created.
### Actual behavior
//when I tried to create database, I received this error:
[root@centos66a hello_phoenix]# mix ecto.create
** (Mix) The database for HelloPhoenix.Repo couldn't be created, reason given: psql: FATAL: Ident authentication
failed for user "postgres"
//There is troublesooting that can fix this by creating the "postgres" role with the permissions needed to log in and
create a database.
=# CREATE ROLE postgres LOGIN CREATEDB;
CREATE ROLE
//but when I entered , I received this error:
postgres-# CREATE ROLE postgres LOGIN CREATEDB;
ERROR: syntax error at or near "su"
LINE 1: su - postgres
^
//but I found that postgres role already exist:
postgres-# pg_roles;
rolname
postgres
(1 row)
// after config/dev.exs set watchers to empty:
watchers: []
error changed:
[root@centos66a config]# mix ecto.create
** (Mix) The task "ecto.create" could not be found