Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Restore Postgresql

Discussion in 'Database Discussion' started by mesranet, Aug 8, 2016.

Tags:
  1. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    316
    Dear All,

    I have problem with manual restore the Postgresql database, i try to enter psql -f all.sql but the error come out with:

    psql: FATAL: no pg_hba.conf entry for host "[local]", user "root", database "root", SSL off

    I follow the advice by cPanel Technical Support by enter at pg_hba.conf with :

    local all all md5

    After that i restart the postgresql and enter the command again psql -f all.sql and now it prompt with the password and when i enter the password, theres another error:

    psql: FATAL: password authentication failed for user "root"

    Please advice, what should i do ?

    TQ so much
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,633
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    First, change your PostgreSQL password via "WHM Home »SQL Services »Configure PostgreSQL" and ensure you use that password when authenticating as the "postgres" user with the following command after logging in via SSH:


    Code:
    su -l postgres
    Next, ensure you follow the instructions in the document below when attempting to restore a database:

    PostgreSQL: Documentation: 9.2: pg_restore

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice