|
Install XCode
|
xcode-select --install
|
|
Homebrew tap
|
brew tap mongodb/brew
|
|
Homebrew update
|
brew update
|
|
Homebrew install latest
|
brew install mongodb-community
|
|
Homebrew install specific version
|
brew install mongodb-community@6.0
|
|
configuration file
|
/usr/local/etc/mongod.conf
|
|
log directory
|
/usr/local/var/log/mongodb
|
|
create data directory
|
/usr/local/var/mongodb
|
|
processManagement:
|
|
|
fork: true
|
|
|
net:
|
|
|
bindIp: localhost
|
|
|
port: 27017
|
|
|
storage:
|
|
|
dbPath: /usr/local/var/mongodb
|
|
|
systemLog:
|
|
|
destination: file
|
|
|
path: "/usr/local/var/log/mongodb/mongod.log"
|
|
|
logAppend: true
|
|
|
storage:
|
|
|
journal:
|
|
|
enabled: true
|
|
|
Terminal
|
mongosh
|
|
Studio 3T
|
MongoDB Compass
|
|
Robo 3T
|
NoSQLBooster
|
|
HumongouS.io
|
NoSQL Manager
|
|
DronaHQ
|
MongoDB Database Tools
|
|
check if running on port
|
lsof -i tcp:27017
|
|
check if process running
|
ps -ax | grep mongo
|
|
start mongo db service
|
brew services start mongodb-community
|
|
start specific mongo db version
|
brew services start mongodb-community@6.0
|
|
stop mongo db service
|
brew services stop mongodb-community
|
|
start manually
|
mongod --config /usr/local/etc/mongod.conf --fork
|
|
stop mongdb step 1
|
mongsh
|
|
stop mongodb step 2
|
use admin
|
|
stop mongodb step 3
|
db.shutdown()
|
|
Client Connection Refused Error
|
MongoDB is not running
|
|
MongoDB cannot run on port
|
sudo rm /tmp/mongodb-27017.sock
|
|
Check logs
|
cat /usr/local/var/log/mongodb/mongod.log
|
|
MongoDB Cannot run missing data directory
|
mkdir /usr/local/var/mongodb
|
|
MacOS Prevents mongosh Running
|
System Prefereces > Security & Privacy > General > Open Anyway or Allow Anyway
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.