1.2.3 - Connecting pgAdmin and Postgres
Last updated Jan 19, 2025
Last updated
Last updated Jan 19, 2025
Last updated
I recommend not pausing your workflow once you docker run -it
in this video
Youtube Video | ~10 min
In this video we will talk about using pgAdmin to manage our Postgres in Docker. We will learn about creating a network to connect our containers. Then, we get to take a look at the front end of our work and we will create a new server on pgAdmin to host our taxi dataset.
"pgAdmin is an open-source, web-based graphical user interface (GUI) tool primarily used to manage and administer PostgreSQL databases, allowing users to perform tasks like creating databases, tables, users, and executing SQL queries through a visual interface rather than just command-line commands; essentially, it's the primary management tool for PostgreSQL databases." - AI
"Container networking refers to the ability for containers to connect to and communicate with each other, or to non-Docker workloads."
Then we want to add the network and network name to our docker run command for both containers
If you stop your docker container at any point, go to your docker desktop to restart it. You can also get to your Port(s) by clicking on them here - such as 8080:80
Make sure your container is running and head to http://localhost:8080/. After entering the username and password as discussed above, we will want to add a 'Server'
General Tab - Name = 'Docker Localhost'
View the above docker run commands in my github repo
Note that in 1.2.5 we will be using docker-compose in a yaml file method instead
To connect the two, we need to create a network
You should now be able to get to and log in to the front end at http://localhost:8080/
The UI for PgAdmin 4 has changed. Right click on 'Servers', Click 'Register', Click 'Server'.
Now we should have a new server in local host 8080 that is connected to our dataset in 5432