skip to Main Content

I create a container posgresql with this command: docker run --name posgre_db -e POSTGRES_USER="user" -e POSTGRES_PASSWORD="password" -p 5432:5432 -d postgres:latest

when i try to create a connection with DBeaver i get a error:
enter image description here

I can go into the container

λ docker exec -it posgre_db psql -U user -d postgres
psql (16.4 (Debian 16.4-1.pgdg120+1))
Type "help" for help.

postgres=#

In DBeaver
enter image description here


I edit connection, i put in host: 192.168.1.15, and i get this error:

FATAL: No entry in pg_hba.conf for host 192.168.1.15, user user,
'postgres' database, no encryption
FATAL: No entry in pg_hba.conf for host 192.168.1.15, user user,
'postgres' database, no encryption

2

Answers


  1. Instead of using "localhost" use your system’s IP address.

    1. Open Command Prompt: On Windows, search for "cmd" and open the Command Prompt application.
    2. Find Your IP Address: Type ipconfig and press Enter. Look for the line that says "IPv4 Address" and note down the IP address displayed there.
    3. Replace "localhost": In your code or application settings, wherever you see "localhost," replace it with your system’s IP address.
      Example:

    If your IP address is 192.168.1.100, you would replace localhost:8080 with 192.168.1.100:8080.

    Login or Signup to reply.
  2. Stratford Airport Taxi. Reliable airport transfers, luxury chauffeur service, and rides to Toronto Pearson, Billy Bishop, and Hamilton Airports
    enter image description here

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