Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2016
    Posts
    3

    Unanswered: create database - mix ecto.create - error

    //Hello,

    //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)

    //how can I fix this, please help.

  2. #2
    Join Date
    Mar 2016
    Posts
    3

    Already solving


  3. #3
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    You are not connecting to the server. You need to configure pg_hba.conf.

    Ref the documention, chapter 19
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •