![]() If you watch the previous command prompt (in which we ran the MongoDB command) you will find the following message: The Mongo command is used to start a client. Open another command prompt window and run the mongo command. Each file and folder has a specific task and use. You will find that some files and folders have been created automatically. Now again go to the C:\data\db directory. The MongoDB command is used to run a server at a specific port number. When you run this command the system will show many messages. First, close the opened Command Prompt and open it again.įirst, run the “ mongod” command. So far, the db folder is empty. In the future, all the data and the database will be stored here.Īfter all the preceding tasks we run the MongoDB server and client. Now you will find that the folder named data has been created in your C: directory, this folder contains another folder whose name is db. For this, open a command prompt and execute the following command. Then, we create a default directory where MongoDB will save all its data. Select the Path variable from the System variables. Now go to System Properties and press the Environment Variables button.
0 Comments
Leave a Reply. |