Login failed - possible solution

  • Recently i had installed 8.2.5 and got "Login failed" issue
    Everything except phpPgAdmin was working just fine
    (PgAdmin3, PHP scripts, JSP/Java)

    I had resolved the issue by giving CONNECT privilege
    to template1 for the user i was trying to connect via phpPgAdmin

    grant connect on database template1 to "some user";

    • Hum, here a quote from our conf/config.inc.php file :

          // Change the default database only if you cannot connect to template1.
          // For a PostgreSQL 8.1 server, you need to set this to 'postgres'.
          $conf['servers'][0]['defaultdb'] = 'template1';