Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.5K
Visualizações
Accessing PostgreSQL (on wsl2) from DBeaver (on Windows) fails: "Connection refused: connect"

What I'm trying is to use Postgres and access it from DBeaver.

  • Postgres is installed into wsl2 (Ubuntu 20)
  • DBeaver is installed into Windows 10

According to this doc, if you access an app running on Linuc from Windows, localhost can be used.

However...

enter image description here

Connection is refused with localhost. Also, I don't know what this message means: Connection refused: connect.

Does anyone see potential cause for this? Any advice will be appreciated.

Note:

  • The password should be fine. When I use psql in wsl2 and type in the password, psql is available with the password
  • I don't have Postgres on Windows' side. It exists only on wsl2
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I found a solution by myself.

I just had to allow the TCP connection on wsl2(Ubuntu) and then restart postgres.

sudo ufw allow 5432/tcp
# You should see "Rules updated" and/or "Rules updated (v6)"
sudo service postgresql restart

I didn't change IPv4/IPv6 connections info. Here's what I see in pg_hba.conf:

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda