Answer the question
In order to leave comments, you need to log in
Python MongoDB Why can't start local server?
I run the simplest code:
from pymongo import *
db = MongoClient()['db']
table = db['table']
table.save({1:'blabla'})
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 61] Connection refused
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
Answer the question
In order to leave comments, you need to log in
To perform operations with the database, the MobgoDB server must be running.
For Linux:
lsof -i:27017
sudo apt-get install mongodb
sudo service mongodb start
tail -n200 /var/log/mongodb/mongodb.log
brew update
brew install mongodb
mkdir -p /data/db
sudo chmod -R 777 /data/db
mongod
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question