The database connection properties include Hostname ( localhost ), Port ( 27017 ), SRV Record, Authentication ( None ), Replica Set Name, Read Preference ( Primary ), SSL ( None ), SSH Tunnel ( None ), Favorite Name.
Click the New Connection item in the left panel, then you can input the connection properties data in the right Connect to Host panel.
It will open the MongoDB Compass – Connect dialog window.
It will add an icon to the macOS desktop, click the icon to open it.
Brew install mongodb in windows install#
Download Compass to a local folder and install it.
Besides command, you can also use MongoDB GUI client MongoDB Compass to manage the NoSQL database.
# get the documents saved in this collection.
You can run the command mongo in a terminal to connect to it.
Now the MongoDB server has been started successfully.
The DB server used default port number is 27017.
Now run mongod command in terminal again, the MongoDB server will start successfully.
Create the /data/db folder with the below command in the terminal.
If you meet the below error message, that means it can not find the /data/db folder, MongoDB needs this folder to run.Įxception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating.
Open a terminal and run mongod command in it.
# Display new environment variable to verify the PATH value has been changed. # Make environment variable change take effect.
# Edit user profile file, add Mongodb bin folder to the PATH env variable value.
Add MongoDB bin folder into the PATH environment variable value with the following steps in the terminal.