skip to Main Content

I want to connect pgadmin (Windows) with postgreSQL-11.18 (Ubuntu 22.04) and getting error: connection timeout error

I am following steps from: link

I have started postgres as mentioned in steps:
Started postgreSQL

While Connecting with pgAdmin I am getting this error: link

I have followed the same steps as mentioned.

If anyone had encountered already, need help.

2

Answers


  1. follow this tutorial How to install Postgresql and AGE. It worked for me, make sure that your PostgreSQL is up to date.

    Login or Signup to reply.
  2. I was able to install pgadmin on windows native, with postgres server on WSL Arch linux following the tutorial you mentioned but with a few changes:

    1. Run postgres server on WSL: pg_ctl -D <your database directory> start, the output was this:
    ╰─❯ pg_ctl -D $PGDATA16 start
    waiting for server to start....2023-07-13 12:08:01.660 -03 [4659] LOG:  starting PostgreSQL 16beta1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.1.1 20230429, 64-bit
    2023-07-13 12:08:01.662 -03 [4659] LOG:  listening on IPv4 address "127.0.0.1", port 5432
    2023-07-13 12:08:01.676 -03 [4659] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
    2023-07-13 12:08:01.707 -03 [4662] LOG:  database system was shut down at 2023-06-30 17:18:29 -03
    2023-07-13 12:08:01.738 -03 [4659] LOG:  database system is ready to accept connections
    
    1. Get the second line of the output listening on IPv4 address "127.0.0.1", port 5432

    2. While adding a new server on pgadmin, in the "connection" tab, you need to put Host name/address the IPv4 address you saw in the output: 127.0.0.1.

    3. Maintenance databse needs to be the name of the database of your postgres installation. You can see the available databases with the command psql --list on WSL.

    4. Username needs to be the username you connect to postgres on WSL, and the password needs to be the one you login to your username. You can save it.

    5. Give a good name to your connection on the general tab and save it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search