I am using docker image https://hub.docker.com/_/mongo/ (Latest MongoDB version)
I run command
docker run --name some-mongo -d mongo
Then I install Studio 3T I enter connection information like this
but I can't connect. What is correct connection must declare in Studio 3T in this case? How to connect MongoDB instance (docker) by Studio 3T?
You need to export the port you want to use in your docker command. e.g.
docker run -p 127.0.0.1:27017:27017 --name some-mongo -d mongo
This opens the port of the container on your host machine.
Click New Connection
Enter the Connection name
Click on From URI
Enter the URI in the following format
mongodb://{username}:{password}@{ip_address}:{port}/?authSource=admin
Click OK
Click Test Connection
Works?
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