The next step is setting up the MongoDB environment to get started with MongoDB. You will need to add MongoDB folder path (C: Program Files MongoDB Server 3.4 bin) in your system’s environment variable (PATH variable). MongoDB also requires a data directory to store all the information. The default data directory path is C: data db. Download MongoDB. Get MongoDB from official website, extracts it: $ cd /Download $ tar xzf. Name modified size md5 sig sha1 sha256; osx/mongodb-osx-ssl-x8664-debugsymbols-v4.0-latest.tgz: 2020-10-30 19:52:17: 212891209: md5: sig: sha1: sha256: osx/mongodb-osx-ssl-x8664-v4.0-latest.tgz.
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
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
The Docker Desktop installation includes Docker Engine, Docker CLI client, Docker Compose, Notary, Kubernetes, and Credential Helper. Install and run Docker Desktop on Mac. Double-click Docker.dmg to open the installer, then drag the Docker icon to the Applications folder. Double-click Docker.app in the Applications folder to start Docker.
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
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
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
![Mongodb client mac download mac Mongodb client mac download mac](/uploads/1/2/6/4/126481450/230824733.png)
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
Mac Mongodb Start
If you want to bypass the permission problem, you can also not create a data folder in the root directory!!!
Enter the command again
Enter the command again
If you see it
Proves that the service was started successfully.
Proves that the service was started successfully.
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
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
Well, a brief introduction to here ~ welcome to leave a message to exchange and supplement~
I still see a lot of people asking 'what's the best MongoDB client for Mac OS X' (besides the
mongo
shell console), so I think it would be only fair to share my experience. I've been using MongoDB a lot and for some reason I haven't been too comfortable using the shell console. I mean, you need an integrated code editor to fiddle with those somewhat verbose JSON-formatted queries...
Run Mongodb Mac
So I was constantly looking for alternatives; 18 months ago there was none I could find and learn to like, really, but now I really favour Robomongo. It gives you 'the full power of MongoDB shell', but in the same time you can easily save, load, edit your queries, do copy/paste, view your results as JSON/trees/tables... and yes, you do get a decent autocompletion :-).
It's also cross-platform, free and open-source (GitHub repo here).
![Download Download](/uploads/1/2/6/4/126481450/222272256.gif)
Fotonauts' fork of MongoHub is another interesting alternative to keep an eye on; it has a more 'native' OS X feel but IMO it does lack a better query editor...