Professional Documents
Culture Documents
Installation
6. Copy the file path in Data folder and paste in the Data Directory(e.g:D:MongoDB\Data)
7. Copy the file path in log folder and paste in the Log Directory(e.g:D:MongoDB\log)
8. Select service as Network Service user>Next
9. Uncheck the Install Mongo compass>Next
10. Click to Install>Finish
Replace Config File:
1. Go to “C:\Program Files\MongoDB\Server\4.2\bin”
2. Select mongod.cfg file.
3. Right click>Open with Notepad++
4. Change the Bind ip as “0.0.0.0” and Remove # before Security and Security as “authorization:
'enabled'” and save
Note: Better to Copy “authorization: 'enabled'” in the mongod.cfg file in \\10.199.4.12\Shared
Folders\Projects\MaxBlox\Release\MaxBlox 6.0\MongoDBComponents and Paste in
“C:\Program Files\MongoDB\Server\4.2\bin” mongod.cfg.
5. Restart the MongoDb Server in the Service
1. Go to C:\Program Files\MongoDB\Server\4.2\bin
2. Add the given createAdminuser.js file in mongo installed destination bin folder
3. Update the user and pwd in the createAdminuser.js.
4. Select the mongo.exe file and right click “Run as administrator”
Enable Firewall:
1. Go to Start and search Windows Firewall and Advanced settings.
2. Click Inbound rules
3. Click to add new rule.
6. Click next
7. Click to browse and select the Path
”C:\ProgramFiles\MongoDB\Server\4.2\bin\mongod.exe”
22.
23. Click Next
24. Select “Allow the connection” in actions
Test connection:
1. Start> Run
2. Run the command as “mongo.exe --username user1 --password pwd1
--authenticationDatabase admin --host 10.199.4.22 --port 27017 "
3. Go to “C:\Program Files\MongoDB\Server\4.2\bin”
4. Open “createAdminUser.js” file
5. To check the users and pwd
6. Update the same username and password in the maxbloxSearch.in
1. Go to “C:\Program Files\MongoDB\Server\4.2\bin”
2. In mongo.exe file , Right click “Run as administrator”
3. Hit enter “use admin”
4. Hit enter “db.auth({“user”:”User1”,”pwd”:”pwd1”});”
5. E.g: “db.auth({“user”:”sa”,”pwd”:”Cellaradmin”});”
6. Hit enter “load(“createAdminUser.js”);”
4.
Mongo Compass:
16. Filter:
1. Used to retrieve the data
2. Syntax: {field name:” Value”}
3. Click to “FIND”.