当前位置:网站首页>Mongodb installation and use
Mongodb installation and use
2022-07-25 09:21:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
One .Windows Platform installation MongoDB
1.MongoDB download
MongoDB Available for 32 Bit and 64 Bit system precompiled binary package , You can start your MongoDB Download and install on the official website ,MongoDB Precompiled binary package download address :https://www.mongodb.com/download-center/community
2. Just install by default step by step , My installation directory customization
3. Configure environment variables , Enables execution anywhere bin Under the exe Program
We set the environment variable (path) Words , You can use... Anywhere at the command prompt mongoDB The command .
4. Set the data storage directory
D:\softwore\mongodb3\bin>mongod.exe –dbpath D:\softwore\mongodb3\data\db
D:\softwore\mongodb3\bin>mongod.exe --dbpath D:\softwore\mongodb3\data\db
2021-09-08T15:42:06.102+0800 I CONTROL [initandlisten] MongoDB starting : pid=26020 port=27017 dbpath=D:\softwore\mongodb3\data\db 64-bit host=LEJU-1UT79B6G6B
2021-09-08T15:42:06.108+0800 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2021-09-08T15:42:06.112+0800 I CONTROL [initandlisten] db version v3.0.15
2021-09-08T15:42:06.112+0800 I CONTROL [initandlisten] git version: b8ff507269c382bc100fc52f75f48d54cd42ec3b
2021-09-08T15:42:06.114+0800 I CONTROL [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
2021-09-08T15:42:06.115+0800 I CONTROL [initandlisten] allocator: tcmalloc
2021-09-08T15:42:06.116+0800 I CONTROL [initandlisten] options: { storage: { dbPath: "D:\softwore\mongodb3\data\db" } }
2021-09-08T15:42:06.132+0800 I JOURNAL [initandlisten] journal dir=D:\softwore\mongodb3\data\db\journal
2021-09-08T15:42:06.134+0800 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2021-09-08T15:42:06.183+0800 I JOURNAL [durability] Durability thread started
2021-09-08T15:42:06.186+0800 I JOURNAL [journal writer] Journal writer thread started
2021-09-08T15:42:06.238+0800 I INDEX [initandlisten] allocating new ns file D:\softwore\mongodb3\data\db\local.ns, filling with zeroes...
2021-09-08T15:42:06.390+0800 I STORAGE [FileAllocator] allocating new datafile D:\softwore\mongodb3\data\db\local.0, filling with zeroes...
2021-09-08T15:42:06.392+0800 I STORAGE [FileAllocator] creating directory D:\softwore\mongodb3\data\db\_tmp
2021-09-08T15:42:06.413+0800 I STORAGE [FileAllocator] done allocating datafile D:\softwore\mongodb3\data\db\local.0, size: 64MB, took 0.013 secs
2021-09-08T15:42:06.451+0800 I NETWORK [initandlisten] waiting for connections on port 270175. link mongodb
We can run it in a command window mongo.exe Command to connect MongoDB, Execute the following command :
6. test
Last : Browser access
7.win10 Set up Mongodb Start as Windows Service self starting
Have a problem :
1.net start MongoDB Invalid service name error resolution
1. take data All files in the directory are deleted ; 2. Open in administrator mode cmd,cd To mongodb bin Under the table of contents , function : mongod –config “D:\Mongo\mongo.conf” –install –serviceName “MongoDB” Run again : net start MongoDB
2. Resolve the connection mongoDB Problems arise :MongoDB : Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
cmd The command line runs commands as an administrator :
mongod --config "D:\softwore\mongodb3\mongod.cfg"Reference resources :https://www.runoob.com/mongodb/mongodb-window-install.html
https://www.cnblogs.com/duhuo/p/4552132.html
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/111445.html Link to the original text :https://javaforall.cn
边栏推荐
- JS touch screen game source code ice and snow journey
- leetcode-238.除自身以外数组的乘积
- 分享一个避免递归的部门设计方法
- Rich text style word image processing
- Canvas dynamic picture avatar shaking JS special effect
- How does Youxuan database encrypt data?
- 『怎么用』代理模式
- Thymeleaf 笔记
- Activemq-- delayed delivery and scheduled delivery
- Wechat applet obtains the data of ---- onenet and controls the on-board LED of STM32
猜你喜欢

Canvas dynamic picture avatar shaking JS special effect

Bi business interview with data center and business intelligence (I): preparation for Industry and business research

Nacos搭建配置中心出现client error: invalid param. endpoint is blank

redis的五种数据结构原理分析

『怎么用』代理模式

Ranking of data results in MySQL

Leetcode组合总和+剪枝
![[buuctf-n1book][Chapter 2 advanced web]ssrf training](/img/29/8894d04b27e0e73c4458c27bd9b935.png)
[buuctf-n1book][Chapter 2 advanced web]ssrf training

Labview--- signal generator

ActiveMQ -- JDBC code of persistent mechanism
随机推荐
nacos2.1.0集群搭建
Ctfhub skill tree Web
Live broadcast preview | how to build an enterprise cloud management platform in the cloudy era?
ActiveMQ -- kahadb of persistent mechanism
uni-app - Refused to display ‘xxx‘ in a frame because an ancestor violates the following Content Sec
[STL]list模拟实现
360 degree drag panorama plug-in tpanorama.js
Troubleshooting error: NPM install emojis list failed
【Nacos】NacosClient在服务注册时做了什么
ActiveMQ -- JDBC with persistent mechanism
Probe into Druid query timeout configuration → who is the querytimeout of datasource and jdbctemplate effective?
JDBC quick start
[common tools] obtain system status information based on psutil and gputil
『怎么用』代理模式
2022-7-14 JMeter pressure test
log4j2基础配置
Comparison between symmetric encryption and asymmetric encryption
Guangzhou has carried out in-depth "100 day action" to check the safety of self built commercial houses, and more than 2 million houses have been checked in two months
API健康状态自检
This ten-year content industry infrastructure company is actually an invisible Web3 pioneer