top of page
Search

Install Mongo using Docker and access it from OUTSIDE

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])





ree


 
 
 

Comments


Subscribe Form

©2019 by Big Data. Proudly created with Wix.com

bottom of page