Categories
Geekpulp

MongoDB and macOS Catalina

Like a good Apple nerd, I updated to the latest version of macOS Catalina. If you’re using older 32bit apps Catalina won’t run them. Thankfully I wasn’t in that position so I didn’t anticipate any issues. So young so innocent.

As it turns out another chance in Catalina does affect my normal workflow. The change is related to a security improvement that prevents users from creating new files in root.

Not an issue for most things, but MongoDB by default uses /data/db as the location for storing data. To fix this the best solution I came across was to simply change the location from the default to somewhere in your user folder. This is really easy to do using the following command in terminal:

Mongo will now work and you can get on with life.