(1) 首先去官网下载mongoDB for windows zip包
http://www.mongodb.org/downloads
(2) 把mongoDB解压缩到:E:\WebTools\mongodb-win32-i386-1.8.2
并新建“log.txt”日志文件。新建“db”文件夹。
(3) 为mongoDB加载服务,并记录日志文件,并修改mondb安装路径:
E:\WebTools\mongodb-win32-i386-1.8.2\bin>mongod.exe --install --logpath=E:\WebTools\mongodb-win32-i386-1.8.2\log.txt --dbpath=E:\WebTools\mongodb-win32-i386-1.8.2\db
all output going to: E:\WebTools\mongodb-win32-i386-1.8.2\log.txt
Creating service MongoDB.
Service creation successful.
Service can be started from the command line via 'net start "MongoDB"'.
E:\WebTools\mongodb-win32-i386-1.8.2\bin>
(4) 启动mongoDB服务:
E:\WebTools\mongodb-win32-i386-1.8.2\bin>net start mongodb
Mongo DB 服务已经启动成功。
E:\WebTools\mongodb-win32-i386-1.8.2\bin>
(5) 完成!进入mongoDB啦:
E:\WebTools\mongodb-win32-i386-1.8.2\bin>mongo
MongoDB shell version: 1.8.2
connecting to: test
> 3+3
6
> db
test
> help
db.help() help on db methods
db.mycoll.help() help on collection methods
rs.help() help on replica set methods
help connect connecting to a db help
help admin administrative help
help misc misc things to know
help mr mapreduce help
show dbs show database names
show collections show collections in current database
show users show users in current database
show profile show most recent system.profile entries with time >= 1ms
use <db_name> set current database
db.foo.find() list objects in collection foo
db.foo.find( { a : 1 } ) list objects in foo where a == 1
it result of the last line evaluated; use to further iterate
DBQuery.shellBatchSize = x set default number of items to display on shell
exit quit the mongo shell
> exit
bye
E:\WebTools\mongodb-win32-i386-1.8.2\bin>
分享到:
相关推荐
MongoDB 5.0.6 windows版本
windows下mongodb数据库的安装
Windows 平台安装 MongoDB:MongoDB 下载;命令行下运行 MongoDB 服务器;将MongoDB服务器作为Windows服务运行;MongoDB后台管理 Shell。
mongodb_x64位windows安装版本,官方正版,mongodb_x64位windows安装版本,官方正版
mongodb安装 ...在阅读本教程后,您将了解如何在Windows系统下轻松安装MongoDB,并能够使用它来创建数据库、集合和文档等常用操作。此外,本教程还提供了一些常见问题的解决方案,以帮助您更好地使用MongoDB。
windows下mongodb安装与使用整理
在网上看到很多朋友关于在linux下搭建mongodb的帖子,而很少有在windows下的,于是,我尝试着搭建了一个windows下的集群,可供参考
mongodb启动加入windows服务
windows安装及简单配置mongodb3.6 windows安装及简单配置mongodb3.6 windows安装及简单配置mongodb3.6
MongoDB Community Server(mongodb-windows-x86_64-5.0.8-signed.msi)适用于RedHat / CentOS 7.0 MongoDB是一个基于分布式文件存储的数据库。由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案。 ...
最新版windows mongodb-windows-x86_64-5.0.1-signed.msi最新版windows mongodb-windows-x86_64-5.0.1-signed.msi
MongoDB 是目前在IT行业非常流行的一种非关系型数据库(NoSql),其灵活的数据存储方式备受当前IT从业人员的青睐。这里主要讲如何在windows平台下安装MongoDB。
安装MongoDB并注册成windows服务
mongodb-windows-x86_64-6.0.5最新稳定版本,压缩包解压直接使用。
如何在windows上面安装mongodb数据库 单机版安装 已经亲自测试安装成功。
MongoDB window 安装包,mongodb-windows-x86_64-4.4.0-signed.msi,免除下载速度慢的烦恼!
mongodb-windows-64mongodb-windows-64mongodb-windows-64
mongodb Windows7 64位
mongodb数据库安装包 windows
mongodb安装包 解压后直接安装使用即可