This tutorial covers mac installation in MongoDB. This course covers the basics of working with MongoDB. Work your way through the videos/articles and I'll teach you everything you need to know to interact with Mongo's flexible document database management system and create powerful document databases! How to Install MongoDB on MacOS. MongoDB is an open source, cross platform document-oriented database management system. It is a NoSQL database which stores data and schemas as JSON objects. Mongodb is developed by Mongodb Inc and is published under GNU affero General Public License and Apache. This tutorial describes the steps involved in the installation of MongoDB on MacOS.
1、 Installation To download and install the official website, you need to input the mailbox and other information. You can use the command line to install. The MAC is installed as follows
More installation methods can refer to rookie tutorial After the installation, set the environment variables to add the mongodb binary command file directory to the path Enter the following command in the terminal
2、 Start The default path for mongodb data storage is / data / DB(i.e. under the root directory / data / DB), but the directory does not necessarily exist on your computer and can be created manually
Start directly from the command line
At this time, I found that/Data / DB is read-onlyBecause the database needs to read and write data, if you do not have root permission, the folder created under the root directory does not have write permission by default. It can be modified by the following command
If you want to bypass the permission problem, you can also not create a data folder in the root directory!!! Enter the command again
Run Mongodb Mac
If you see it Proves that the service was started successfully.
Download Mongodb Mac
3、 Operation After starting mongodb service, the current command panel cannot perform other operations. Open a new command panel. Enter the following command to enter the operation mode
4、 Command
Download And Install Mongodb On Mac
Well, a brief introduction to here ~ welcome to leave a message to exchange and supplement~