I installed mongodb inside docker container in oracle linux virtual machine. I need to connect this mongodb with mongodb compass. I don't have user account for mongodb and don't have mongod config file in the docker or in virtual machine.
More Information:
I created oracle linux virtual machine from oracle cloud. Then, using my current system's(windows) command prompt, I connected to that machine. Through that, I created a docker container inside the virtual machine. And then, I installed mongodb-6.0.2 inside the docker container. Now, when I try to connect this mongodb database(in virtual machine) to the mongodb compass, It is connecting to my current system's mongodb database(which was installed before the creation of this virtual machine). I also attached the screenshot of my virtual machine's docker and mongodb's information in cmd.
Here is the screenshot of ip of my docker inside the virtual machine
Can anyone solve this issue and tell me how can I make connection of this virtual machine database to mongodb compass?
1条答案
按热度按时间aiazj4mn1#
If wanting to use Compass from Windows and connect to a MongoDB container running an Oracle cloud compute instance, you'll need to make sure networking allows for connections to port 27017 via an ingress rule in your network security group.
Another option is to use port forwarding over ssh.