If you do not escape, an error will be reported:Įrror-parsing-yaml-config-file-yaml-cpp-error-at-line-3-column-15-unknown-escape-character-dī. #The directory where the mongod instance stores its data.Default Value is "\data\db" on Windows.ĭbPath: D:\work\databases\mongodb-windows-x86_64-4.4.2-rc1\mongodb-win32-x86_64-windows-4.4.2-rc1\dataĬonfiguration File Options configuration fileġ) If double quotation marks are used in the configuration file, such as path address, the contents of double quotation marks will be automatically escaped. Mode 2: start the service in profile modeĬreate a new config folder in the unzip directory, and create a new configuration file in this folder nf The content format of the document is yaml storage: Under the bin directory, there are some common commands, such as for mongod to start the service and mongo client to connect to the service. In order to facilitate us to start each time, we can set the bin directory of the installation directory into the path of the environment variable. If we want to change the default boot port, we can specify the port through – port. We can see in the boot information that the default port of MongoDB is 27017. Open the command line prompt in bin directory and enter the following command: mongod -dbpath=.\data\db Mode 1: command line parameter mode to start the service Step 2: in the unzip directory, manually create a directory to store data files, such as data/db Step 1: decompress the compressed package to the specified directory:
Here I did not write according to the official website, I use the decompression version, interested friends can install according to the official website according to other types installĪccording to the example above, we will get a file mongodb-windows-x86 after downloading_ 64-4.4.2-rc1.zip.
Select the appropriate version, operating system, and type of download package. When y is even, it means that the current version is stable, such as 1.6.3, 4.0.10 When y is an odd number, it means that the current version is the development version, such as 1.5.2 and 4.1.13 MongoDB's version naming standard, such as: x.y.z After opening, we can see that there are version, operating system and download package type on the right. We can select MongoDB Community Server (free). Install MongoDB Download MongoDBĪfter clicking in, there will be several menus. MongoDB Compass is a visual connection tool of MongoDB, which provides rich functions.
MongoDB and Compass installation tutorial