fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

PostgreSQL connect from client PC 25 Mar 2020 11:23 #13853

  • hsc's Avatar

  • hsc

  • Topic Author


  • Posts: 130
  • Hi All,

    I am testing a new app using PostgreSQL. Everything works OK on the local PC. If I want to connect from a client PC, I have a problem to connect to PostgreSQL Server. The server PC with Windows 7 Ultimate 64b., The client PC with Windows 10 Pro 64b. Can anyone help?

    Juraj

    Please Log in or Create an account to join the conversation.

    PostgreSQL connect from client PC 25 Mar 2020 11:38 #13854

  • FFF's Avatar

  • FFF


  • Posts: 995
  • hsc wrote: I am testing a new app using PostgreSQL. Everything works OK on the local PC. If I want to connect from a client PC, I have a problem to connect to PostgreSQL Server. The server PC with Windows 7 Ultimate 64b., The client PC with Windows 10 Pro 64b. Can anyone help?

    Probably not - too less information available.
    Can you connect using psql or similiar tool to the db at the server at all? What did you write in the postgres.conf re allowed access sources?
    Regards
    Karl (X# 2.5b; Xide 1.25; W8.1/64 German)

    Please Log in or Create an account to join the conversation.

    PostgreSQL connect from client PC 25 Mar 2020 11:51 #13855

  • hsc's Avatar

  • hsc

  • Topic Author


  • Posts: 130
  • I insert to pg_hba.conf this line
    host all all 192.168.0.127/24 md5

    in postressql.conf
    listen_addresses = '*'

    I check connet from client PC with Postgres ODBC
    Attachments:

    Please Log in or Create an account to join the conversation.

    PostgreSQL connect from client PC 25 Mar 2020 12:21 #13858

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2336
  • Hi Juraj,
    IMHO
    host all all 192.168.0.127/24 md5
    should be
    host all all 192.168.0.1/24 md5
    Do you have restarted the Postgres server process after the changes?
    If your host is a Windows machine, you need also to open the firewall on the port 5432.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    PostgreSQL connect from client PC 25 Mar 2020 13:49 #13863

  • hsc's Avatar

  • hsc

  • Topic Author


  • Posts: 130
  • Hi Wolfgang,

    I open the firewall on the port 5432 on client PC. When I open the firewall on the port 5432 on server PC, connection is OK.
    Thank you very much!

    Juraj

    Please Log in or Create an account to join the conversation.

    PostgreSQL connect from client PC 25 Mar 2020 14:16 #13865

  • wriedmann's Avatar

  • wriedmann


  • Posts: 2336
  • Hi Juraj,
    normally the Windows Firewall is configured to permit all exiting connections (otherwise you would have to open every single port for every client machine).
    Incoming connections are normally all blocked - if you have some service that needs to be reachable from other machines you have to add a rule by hand.
    Normally the installation process could open the port, but IMHO it is better to not do that, and to let this work to the administrator.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1