Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2009
    Posts
    2

    Unanswered: Not able to connection

    hi,

    I am newbie to postgres,

    I have installed this on Vista I could be able to connect through pgAdminIII to loacalhost server.

    But through psql.exe running it is not allowing me to connect with same password.

    saying "pg_restore: [archiver (db)] connection to database "lmn" failed: FATAL: passwo d authentication failed for user "Administrator"

    Can any body have idea about the problem?

    Thanks in advance

  2. #2
    Join Date
    Oct 2009
    Posts
    1

    Authentication failure

    Hi Hemant,

    I am also new to PostgreSQL but the i have faced the same problem this is due to PostgreSQL tries to login using he same authentication credentials which your Operating System uses.

    Resolution: use following command to connet

    >psql -U <"postgreSQL database username you provided during installation">
    Then it will ask you paswword for the same PostgreSQL database user that you provided during postgreSQL installation.

    Hope this will resolve your problem.

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Quote Originally Posted by vinaykumarkapse
    Hi Hemant,

    I am also new to PostgreSQL but the i have faced the same problem this is due to PostgreSQL tries to login using he same authentication credentials which your Operating System uses.

    Resolution: use following command to connet

    >psql -U <"postgreSQL database username you provided during installation">
    Then it will ask you paswword for the same PostgreSQL database user that you provided during postgreSQL installation.

    Hope this will resolve your problem.


    Hi Vinay,

    First of thanks for your response.

    I am sorry I forgot put my all investigations here.

    I have found the way to login to any databse.

    You are right

    Here are some more info on this.

    a) psql -U postgres
    This will take use to postgres database which is default to postgre SQL

    This will ask password. If you want to get rid of password typing each time then do as #b below

    b) set PGPASSWORD="Password for postgres databse"
    then type below commond

    psql -U postgres -w

    c) WE can also connect to other database but we need to specify owner name for the that database as login

    psql -U <Database Owner Name> -d <Database Name of the respective Owner specified at -U option>

    d) as like #b we can also do the same thing for #c but I feel if we are using this for local machines then its ok otherwise this is not the right way to store password in sys variable

  4. #4
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    I'm not sure where the question is in all of that. But how connections are authenticated is controlled by pg_hba.conf

    PostgreSQL: Documentation: Manuals: PostgreSQL 8.3: The pg_hba.conf file

  5. #5
    Join Date
    Oct 2009
    Posts
    1
    I am not so hopeful. We'd have heard about it long before now.Plus, I would probably have had to pay for a computer upgrade.

Posting Permissions

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