Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Windows install mongodb

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Data: http://docs.mongodb.org/manual/core/introduction/

Download: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

Unzip and add the file path / bin to the environment variable Path

Mongodb needs to set a data storage path first, which defaults to c:\\ data\ db

Md data

Md data\ db

Modify the default startup database location C:\ mongodb\ bin\ mongod.exe-- dbpath d:\ test\ mongodb\ data

Run C:\ mongodb\ bin\ mongod.exe to start mongodb

Add mongodb to windows startup

Optional steps:

Md C:\ mongodb\ log

Echo logpath=C:\ mongodb\ log\ mongo.log > C:\ mongodb\ mongod.cfg

Add:

C:\ mongodb\ bin\ mongod.exe-- config C:\ mongodb\ mongod.cfg-- install

Net start MongoDB

Undo:

Net stop MongoDB

C:\ mongodb\ bin\ mongod.exe-- remove

Connect mongodb:mongo.exe

Test:

Db.test.save ({a: 1})

Db.test.find ()

Correct words output:

("_ id": ObjectID ("dfafwerewr432434afadsf"), "a": 1)

Java interface

Http://docs.mongodb.org/ecosystem/drivers/java/

Python interface

Http://docs.mongodb.org/ecosystem/drivers/python/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report