The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PostgreSQL database not working

Discussion in 'General Discussion' started by sh4ka, Aug 30, 2008.

  1. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Hello,

    Recently installed postgreSQL using /scripts/installpostgres, also recompiled apache and activated postgreSQL from the php menu, after that created datatabase, username and add the user to the db from pgsqladmin at cPanel.

    I need to import an sql file to the new database and it seems to be impossible:
    What am I doing wrong?

    Im using RHEL 5.2 + lastest Release cPanel version.

    Thank you.
     
  2. subin_hutton

    subin_hutton Member

    Joined:
    Jul 25, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    Please check this thread.

    1)http://semweb.weblog.ub.rug.nl/node/61

    To fix this error open PostgreSQL client authentication configuration file /var/lib/pgsql/data/pg_hba.conf :
    # vi /var/lib/pgsql/data/pg_hba.conf
    This file controls:

    1. Which hosts are allowed to connect
    2. How clients are authenticated
    3. Which PostgreSQL user names they can use
    4. Which databases they can access

    By default Postgresql uses IDENT-based authentication. All you have to do is allow username and password based authentication for your network or webserver. IDENT will never allow you to login via -U and -W options. Append following to allow login via localhost only:

    local all all trust
    host all 127.0.0.1/32 trust

    Save and close the file. Restart Postgresql server:
    # service postgresql restart
    Now, you should able to login using following command:
    $ psql -d myDb -U username -W

    Reference : http://www.cyberciti.biz/faq/psql-fatal-ident-authentication-failed-for-user/
     
Loading...

Share This Page