I recently installed mongodb-2.6.0 with Homebrew.
After successfully installed, I tried to connect using the mongo command. I am receiving the following errors
I got this error after I upgraded to mongo 3.6 with homebrew.
The log /usr/local/var/log/mongodb/mongo.log contained the message shutting down with code:62. This error code means that the existing database is too old to run with the current version of mongo.
I found 2 solutions in another SO question:
/usr/local/var/mongodb)I chose to upgrade. In my case, that meant I had to downgrade to 3.4, run a command in the mongo console, then upgrade again. Mongo requires you to upgrade one major version at a time, so depending on how far back you were, there could be additional steps. The docs will guide you.
The brew switch * and brew services restart commands made swapping between versions relatively painless.