I have pulled postgres image with docker pull postgres. I have also tried to run image from https://docs.docker.com/examples/postgresql_service/
I run them with -p 5432:5432 option, but could not connect with pgAdmin. It gave me timeout when I tried to connect via localhost:5432. Examples I found on the internet say just use -p. I did, and it does not work. Also security settings at least from example above are very permissive. Any suggestions?
To access a database in the pgAdmin browser, expand Servers, the DB instance, and Databases. Choose the DB instance's database name. To open a panel where you can enter SQL commands, choose Tools, Query Tool.
If the error message returns, make sure that you have the correct password, that you are authorized to access the server, and that the access has been correctly configured in the server's postgresql. conf configuration file.
Depending on how you ran Docker, this is not likely to work. The Docker Daemon runs in a virtual machine on OS X, which means you actually need to connect to that IP address (rather than localhost). To find that IP address, type the following:
docker-machine ip default
The IP you get back will tell you the IP to connect to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With