(MongoDB) How to use –fork On Windows for multiple servers

Although for most of developers, deploying database On Windows is not advised. For beginners like me, always need do some practise on Windows.

Currently I am studying replica sets, which asks me to run multiple servers at the same time with following commands.

Continue reading “(MongoDB) How to use –fork On Windows for multiple servers”

NameError: name ‘urllib2’ is not defined

I am studying mongoDB with python, I met this problem.

When I tried to open a url by python, I copied some code from internet like following:

and met this error:
NameError: name urllib2 is not defined

Then I found that ‘urllib2’ is a lib for python2 while I use python3

Solution is easy by changing import lib