Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Study Notes 1.2.3: Connecting pgAdmin and PostgreSQL

Overview from lecture 1.2.3. Purpose: To connect pgAdmin, a web-based GUI tool, to a PostgreSQL database for easier database management and querying. Context: Utilizing Docker to run PostgreSQL and pgAdmin in containers. …

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Overview from lecture 1.2.3.





  • Purpose: To connect pgAdmin, a web-based GUI tool, to a PostgreSQL database for easier database management and querying.


  • Context: Utilizing Docker to run PostgreSQL and pgAdmin in containers.






Key Concepts






1. Introduction to pgAdmin




  • pgAdmin is a popular tool for managing PostgreSQL databases.

  • Provides a graphical interface for executing queries, managing database objects, and visualizing data.






2. Setting Up Docker





  • Docker: A platform for developing, shipping, and running applications in containers.


  • Containers: Lightweight, standalone, executable packages that include everything needed to run a piece of software.






3. Creating a Docker Network




  • Create a dedicated network for the PostgreSQL and pgAdmin containers to communicate.


  • Command to create a network:


    docker network create my_network









4. Running PostgreSQL Container





  • Example command to run a PostgreSQL container:


    docker run --name postgres_container --network my_network -e POSTGRES_PASSWORD=mysecretpassword -d postgres





  • Parameters:





    • -name: Assigns a name to the container.


    • -network: Connects the container to the specified network.


    • e: Sets environment variables (e.g., password).


    • d: Runs the container in detached mode.











5. Running pgAdmin Container





  • Example command to run a pgAdmin container:


    docker run --name pgadmin_container --network my_network -e [email protected] -e PGADMIN_DEFAULT_PASSWORD=admin -p 80:80 -d dpage/pgadmin4




    In our case:


    docker run -it \
    -e PGADMIN_DEFAULT_EMAIL='[email protected]' \
    -e PGADMIN_DEFAULT_PASSWORD='root' \
    -p 8080:80 \
    dpage/pgadmin4




  • Parameters:





    • p: Maps the host port to the container port (e.g., 80:80).


    • e: Sets default email and password for pgAdmin.











6. Connecting pgAdmin to PostgreSQL




  • Open pgAdmin in a web browser (usually at http://localhost).
    In our case, we use http://localhost:8080/


  • Since we created separate container for pgAdmin and Postgres, we need to use Server to make them able to communicate with each other.




    • Create Network: docker network create pg-network


    • Run Docker container:


      docker run -it \
      -e POSTGRES_USER="root" \
      -e POSTGRES_PASSWORD="root" \
      -e POSTGRES_DB="ny_taxi" \
      -v c:/workspace/de-zoomcamp/1_intro_to_data_engineering/docker_sql/ny_taxi_postgres_data:/var/lib/postgresql/data \
      -p 5433:5432 \
      --network=pg-network \
      --name pg-database \
      postgres:13



      In our case:


      docker run -it \
      -e PGADMIN_DEFAULT_EMAIL="[email protected]" \
      -e PGADMIN_DEFAULT_PASSWORD="root" \
      -p 8080:80 \
      --network=pg-network \
      --name pgadmin \
      dpage/pgadmin4










  • Create a new server connection:





    • General Tab: Name the server connection.


    • Connection Tab:


      • Host: postgres_container (the name of the PostgreSQL container) or its ip address. If connection failed, Try using IP Address:
        Use the IP address of the hopeful_yonath container (172.19.0.3) in the pgAdmin configuration instead of the container name or pg-database.

      • Port: 5432 (default Docker PostgreSQL container port, NOT HOST PORT).

      • Username: root.

      • Password: The password set during container creation.















7. Exploring the Database




  • After connecting, navigate through the database schema.

  • Execute SQL queries directly in pgAdmin.


  • Use the GUI to create, read, update, and delete database entries.



    E.g. Query Tool:


    SELECT
    COUNT(1)
    FROM
    yellow_taxi_data;








8. Troubleshooting Connection Issues




  • Ensure both containers are running in the same network.

  • Check firewall settings and port mappings.

  • Verify the credentials and connection parameters.






Conclusion




  • Connecting pgAdmin to PostgreSQL enhances database management through a user-friendly interface.

  • Utilizing Docker simplifies the setup process and ensures a consistent environment for development and testing.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Study Notes 1.2.3: Connecting pgAdmin and PostgreSQL

Thematisch verwandte Begriffe: Study, Notes, Connecting, pgAdmin · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-49449 | Joplin is an open source note-taking and to-do application that organise…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick