
Setting the dbpath in nf somehow didn’t improve the working. After shutting down MongoDB we need to long command again and again to connect in the right way. However this solution seems to be only temporary. Type the command: ‘mongod –dbpath /PATH/TO/DATABASE/’.Solution for connecting MongoDB to the dataĪssuming that you have the right permission on the folder containing the database-files the following steps can be taken: give mongo permisions: ‘sudo chown YourMacUserName /data/db’ĥ.cd into the new directory just created above: ‘cd /data/db’.make a new directory: ‘sudo mkdir -p /data/db’.


Solution for setting permissions on /data/db The error message show that de dbpath needs to be set in the commandline or that the storagepath needs to be set in the configuration file. Checking the result of the command ‘mongod’ gave that MongoDB didn’t have right permissions. This shows that MongoDB isn’t able to make a connection.

Final stabile solution (see §7) is setting a global alias with the right path in ~/.zshrc 2. Stepwise description of solving permission and connection issues with MongoDB on macOS.
