Install Mongo using Docker and access it from OUTSIDE
- bdata3
- Dec 16, 2021
- 1 min read
Well just spent a couple of hours figuring it out...
follow this link and some common sense and you'll get there
add permissions:
And then to write some python to work with that:
from pymongo import MongoClient
client = MongoClient('127.0.0.1',
username='ata',
password='password123',
authSource='admin')
mydb = client["test1"]
mycol = mydb["q1"]
x = mycol.find({},{'Boot wash':{'2':1}})
print([t for t in x])

Comments