windows mangoDB
来源:互联网 发布:tripmode for windows 编辑:程序博客网 时间:2024/05/18 14:24
C:\Program Files\MongoDB\Server\3.4\mongod.cfg
systemLog:
destination: file
path: d:\data\log\mongod.log
storage:
dbPath: d:\data\db
如果磁盘不足,报错:
com.mongodb.MongoSocketReadException: Exception receiving message
以管理员身份,运行cmd.exe
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Windows\system32>sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe\" --service --config=\"C:\Program Files\Mongo
DB\Server\3.4\mongod.cfg\"" DisplayName= "MongoDB" start= "auto"
[SC] CreateService 成功
C:\Windows\system32>
C:\Windows\system32>net start MongoDB
MongoDB 服务正在启动 ........
MongoDB 服务无法启动。
请键入 NET HELPMSG 3523 以获得更多的帮助。
C:\Windows\system32>net start MongoDB
请求的服务已经启动。
请键入 NET HELPMSG 2182 以获得更多的帮助。
C:\Windows\system32>cd C:\Program Files\MongoDB\Server\3.4\bin
C:\Program Files\MongoDB\Server\3.4\bin>mongo
MongoDB shell version v3.4.10
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.10
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2017-11-30T22:01:41.991+0800 I CONTROL [initandlisten]
2017-11-30T22:01:41.991+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2017-11-30T22:01:41.991+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2017-11-30T22:01:41.991+0800 I CONTROL [initandlisten]
> db
test
> use atii
switched to db atii
> db.t_at_ticketorder.insertOne( { ordercd:1706162500246,membercd:660014810050 } );
{
"acknowledged" : true,
"insertedId" : ObjectId("5a2012b874bfa933011f927d")
}
> db.t_at_ticketorder.find( {} )
{ "_id" : ObjectId("5a2012b874bfa933011f927d"), "ordercd" : 1706162500246, "membercd" : 660014810050 }
> db.t_at_ticketorder.insertOne( { ordercd:1706162500247,membercd:660014810050 } );
{
"acknowledged" : true,
"insertedId" : ObjectId("5a2013c974bfa933011f927e")
}
> db.t_at_ticketorder.insertOne( { ordercd:1706162500248,membercd:660014810051 } );
{
"acknowledged" : true,
"insertedId" : ObjectId("5a2013d774bfa933011f927f")
}
> db.t_at_ticketorder.find( { ordercd: 1706162500247 } );
{ "_id" : ObjectId("5a2013c974bfa933011f927e"), "ordercd" : 1706162500247, "membercd" : 660014810050 }
//https://docs.mongodb.com/manual/tutorial/query-documents/ 查询例子
- windows mangoDB
- mangodb
- mangodb和windows和opencv的关联
- windows下mangodb的安装与配置
- mangodb常用命令
- install mangodb
- MangoDB learning
- MangoDB 实例
- MongoDB Tutorial (MangoDB 指南)
- Mangodb安装(Mac OS)
- MangoDB 介绍入门
- MangoDB--了解篇
- 学习mangodb笔记1
- MangoDB基本操作
- MangoDb学习笔记一
- Mac 安装mangoDB
- MangoDB存储过程
- mangodb索引问题
- 初识MPI
- linux的汇编学习(3)---进入保护模式
- 结构体
- hive的四种数据导入方式
- Java常用日志框架介绍
- windows mangoDB
- [CSP] 201609-5 祭坛
- 修改MySql/MariaDB密码
- Java编程基础教程之泛型
- OpenMV使用初步
- 11.26 语句 程序流程变量 for&while的总结
- mybatis框架(1)---mybatis入门
- python实现自动保存windows聚焦壁纸
- linux 6下面用udev配置asm磁盘的注意事项