Articles → MONGODB → Dbpath And Logpath In Mongodb
Dbpath And Logpath In Mongodb
Purpose
Click to Enlarge
How To Configure The Dbpath And Logpath?
- Create a new path for dbpath and the logpath
- Open the command prompt in the admin mode
- Go to the path of mongod (C:\Program Files\MongoDB\Server\6.0\bin in my case)
- Execute the following command
C:\Program Files\MongoDB\Server\6.0\bin>mongod --dbpath "C:\\Program Files\\MongoDB\\Server\\6.0\\custom\\data" --logpath "C:\\Program Files\\MongoDB\\Server\\6.0\\custom\\log\\mongod.log"