
# or start your own mongod from the command-line Now I have 3.2 on my PATH, I can start the test DB: mongod -versionīrew services start mongodb/brew/mongodb-community (Apparently it needs -force because it is keg-only.) Now I want 3.2 on my PATH instead of the latest: brew unlink mongodb-community #*# Let's stop the current mongodb, if it is running: brew services stop mongodb/brew/mongodb-community #*# brew tap mongodb/brewīut I want to switch to the old version sometimes. I already have the latest version of mongo installed, thanks to.
#Brew install mongodb version 3.2 upgrade
If your current installation is still the pre-September mongodb package then you will need to use that name when you unlink, stop, relink and start, on the lines marked with #*# below.Īnother option is to simply upgrade away from the deprecated package now. Mongod -config /usr/local/etc/mongod.Note: In September 2019 mongodb was removed from homebrew core, so these instructions have been updated to use mongodb-community instead, installed from the external tap. If you want to start either mongod manually don't forget to use the renamed mongod command and config file: mongod2 -config /usr/local/etc/nf #mongodb26 Launchctl load ~/Library/LaunchAgents/īoth mongo daemons should run independently from each other at the same time (at least in my testing VM they did).
#Brew install mongodb version 3.2 install
Then install mongodb26 with brew.ĭepending on your needs copy the plists to your LaunchAgents folder, if you want to launch either mongodb version while logging in: cp /usr/local/Cellar/mongodb26/2.6.12/ ~/Library/LaunchAgents/Ĭp /usr/local/Cellar/mongodb/3.2.10/ ~/Library/LaunchAgents/Īnd load both plists: launchctl load ~/Library/LaunchAgents/ If MongoDB 2 should be your "default" Mongo DB, install mongodb first and rename everything to *3 (instead of *2). MongoDB 3 will be installed with the default file and folder names then. Modify /usr/local/Cellar/mongodb26/2.6.12/ to reflect the changes above (log directories and config file).Modify /usr/local/etc/nf to reflect the changes above (path and dbpath) and a different port in the net section (e.g.


This will separate the old and the new MongoDB executables/config and the databases: It is possible to install mongodb 2.x and 3.x at the same time - you have to rename some files and folders and modify config and plist files though. I’ve also lost my database for 3.2, which appears to have been overwritten while installing 2.6.

The configured storage engine is 'mmapv1'., terminating. Detected data files in /data/db created by storage engine 'wiredTiger'. usr/local/bin/mongotop -> /usr/local/Cellar/mongodb/3.2.10/bin/mongotopīut if I try to start mongod, by running /usr/local/Cellar/mongodb/3.2.10/bin/mongod I get the error T14:26:08.132+0000 exception in initAndListen: 28574 Cannot start server. usr/local/bin/mongostat -> /usr/local/Cellar/mongodb/3.2.10/bin/mongostat usr/local/bin/mongosniff -> /usr/local/Cellar/mongodb/3.2.10/bin/mongosniff usr/local/bin/mongos -> /usr/local/Cellar/mongodb/3.2.10/bin/mongos usr/local/bin/mongorestore -> /usr/local/Cellar/mongodb/3.2.10/bin/mongorestore usr/local/bin/mongoperf -> /usr/local/Cellar/mongodb/3.2.10/bin/mongoperf

usr/local/bin/mongooplog -> /usr/local/Cellar/mongodb/3.2.10/bin/mongooplog usr/local/bin/mongoimport -> /usr/local/Cellar/mongodb/3.2.10/bin/mongoimport usr/local/bin/mongofiles -> /usr/local/Cellar/mongodb/3.2.10/bin/mongofiles usr/local/bin/mongoexport -> /usr/local/Cellar/mongodb/3.2.10/bin/mongoexport usr/local/bin/mongodump -> /usr/local/Cellar/mongodb/3.2.10/bin/mongodump usr/local/bin/mongod -> /usr/local/Cellar/mongodb/3.2.10/bin/mongod usr/local/bin/mongo -> /usr/local/Cellar/mongodb/3.2.10/bin/mongo usr/local/bin/bsondump -> /usr/local/Cellar/mongodb/3.2.10/bin/bsondump I used brew install homebrew/versions/mongodb26 and got some issues with conflicting files, which I could sort out later. Is it possible to install both mongodb 2.6 and 3.2 on the same Mac? I’ve been using mongodb 3.2 (Installed with homebrew) for a while but needed to install 2.6 to support an older project.
