当前位置:网站首页>Configure mongodb database in window environment
Configure mongodb database in window environment
2022-07-07 15:19:00 【1024 questions】
Mongodb I've also learned about it these days , Today, the environment is configured , Learn from today Mongodb database .
One 、 downloadChoose the development environment to download from this website https://www.mongodb.com/download-center, And download it . I chose 64 Bit support ssl Of 3.2.7 edition .
Download the msi Install after file , When installing, you need to pay attention to the installation path , I installed it in G:\MongoDB In the folder of . After installation MongoDB The following files will appear in the folder

1. Create a new folder to store the database , I'm here G:\MongoDB I created a db Folder
2. Specify the data storage location
From the command line window , Point to G:\MongoDB\bin file , And then through mongod --dbpath=G:\MongoDB\db Set the location of data storage

We can also see from the screenshot above 27017 Port waiting for connection , open http://localhost:27017/ You can see the following page

Default Mongodb Yes, even test database , So you can connect and test , After connecting, the effect of the following figure will appear , It may be reported when connecting mongodb Can't start , Because the target computer actively refuses , Unable to connect , This is because we need to mongodb start-up , And the designation mentioned above dbpath


Specific reference : by MongoDB Database registration windows service
The previous operation failed , I tried again today, but I didn't expect to succeed . Here are the steps :
1. The above also says to create db and log Two folders to store data and logs . stay log Create under folder mongod.log file
2. Open to bin Execute the following command under file ( You must be an administrator )
mongod -dbpath "G:\MongoDB\db" -logpath "G:\MongoDB\log\mongod.log" -install -serviceName "MongoDB"Delete service
mongod -dbpath "G:\MongoDB\db" -logpath "G:\MongoDB\log\mongod.log" -remove -serviceName "MongoDB"The following error appears :
2016-07-17T20:22:36.894+0800 I CONTROL [main] log file "G:\MongoDB\log\mongod.log" exists; moved to "G:\MongoDB\log\mongod.log.2016-07-17T12-22-36".

This can be ignored and then started MongoDB service :


Open another one cmd, Input mongo Command to open shell, Actually this shell Namely mongodb The client of , It's also a js The compiler , The default connection is “test” database .
The database is simply added, deleted, modified and checked , Let's have a simple try first

This is about Window Environment Mongodb That's all for the database article . I hope it will be helpful for your study , I also hope you can support the software development network .
边栏推荐
- 【数据挖掘】视觉模式挖掘:Hog特征+余弦相似度/k-means聚类
- MySQL bit类型解析
- 最安全的证券交易app都有哪些
- Use cpolar to build a business website (2)
- "Baidu Cup" CTF competition 2017 February, web:include
- 【数字IC验证快速入门】26、SystemVerilog项目实践之AHB-SRAMC(6)(APB协议基本要点)
- 激光雷達lidar知識點滴
- TypeScript 发布 4.8 beta 版本
- Summer safety is very important! Emergency safety education enters kindergarten
- 上半年晋升 P8 成功,还买了别墅!
猜你喜欢
随机推荐
Niuke real problem programming - day18
Bye, Dachang! I'm going to the factory today
HW初级流量监控,到底该怎么做
Bits and Information & integer notes
#HPDC智能基座人才发展峰会随笔
使用cpolar建立一个商业网站(2)
Ctfshow, information collection: web13
如何在opensea批量发布NFT(Rinkeby测试网)
Compile advanced notes
Ctfshow, information collection: web4
Briefly describe the working principle of kept
Unity's ASE achieves full screen sand blowing effect
How to release NFT in batches in opensea (rinkeby test network)
什么是pv和uv? pv、uv
Runnable是否可以中断
With 8 modules and 40 thinking models, you can break the shackles of thinking and meet the thinking needs of different stages and scenes of your work. Collect it quickly and learn it slowly
【数据挖掘】视觉模式挖掘:Hog特征+余弦相似度/k-means聚类
Jetson AGX Orin CANFD 使用
Ctfshow, information collection: web8
Apache多个组件漏洞公开(CVE-2022-32533/CVE-2022-33980/CVE-2021-37839)



![[target detection] yolov5 Runtong voc2007 data set](/img/b3/b7f3d46075cb1782d772a24362003e.png)




