how to connect a remote database in postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • surk16
    New Member
    • Apr 2013
    • 7

    how to connect a remote database in postgresql

    i want to connect a local remote database
    Code:
    select dblink('host=192.168.1.2 dbname=postgres user=postgres password=webgis',' select * from test');
    however i am getting a below error message,
    ERROR: could not establish connection
    DETAIL: FATAL: no pg_hba.conf entry for host "192.168.1. 10", user "postgres", database "postgres", SSL off

    kindly please any one can help me
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Do you have a pg_hba.conf entry for host "192.168.1. 10"?

    Comment

    • surk16
      New Member
      • Apr 2013
      • 7

      #3
      yes added and reloaded the configuration file. but still issue persists

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Where did you add? You must add on the database you are trying to connect to.

        Comment

        • surk16
          New Member
          • Apr 2013
          • 7

          #5
          database configuration file only.
          please provide clear answer

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            You must add to the config file of the database on 192.168.1.2 and restart that.

            Comment

            • surk16
              New Member
              • Apr 2013
              • 7

              #7
              did the same thing, send me steps or provide docs

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8


                Comment

                • surk16
                  New Member
                  • Apr 2013
                  • 7

                  #9
                  what are the steps to remote a database, send me relevant on that docs, whatever u sent the docs already i have

                  Comment

                  Working...