Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd C:\MongoDB\Server\3.4\bin
C:\MongoDB\Server\3.4\bin>
C:\MongoDB\Server\3.4\bin>
C:\MongoDB\Server\3.4\bin>net start MongoDB
请求的服务已经启动。
请键入 NET HELPMSG 2182 以获得更多的帮助。
C:\MongoDB\Server\3.4\bin>mongo
MongoDB shell version v3.4.24
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.24
Server has startup warnings:
2023-08-05T17:12:10.060+0800 I CONTROL [initandlisten]
2023-08-05T17:12:10.060+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2023-08-05T17:12:10.060+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2023-08-05T17:12:10.060+0800 I CONTROL [initandlisten]
2023-08-05T17:12:10.060+0800 I CONTROL [initandlisten] Hotfix KB2731284 or later update is not installed, will zero-out data files.
2023-08-05T17:12:10.060+0800 I CONTROL [initandlisten]
>
>
>
> use zengwefeng-db
switched to db zengwefeng-db
>
> db
zengwefeng-db
>
> db.user.insert(code:"005129", name:"zengwenfeng")
2023-08-05T17:20:55.615+0800 E QUERY [thread1] SyntaxError: missing ) after argument list @(shell):1:19
> db.user.insert({code:"005129", name:"zengwenfeng"})
WriteResult({ "nInserted" : 1 })
>
> db.user.find()
{ "_id" : ObjectId("64ce14a434d47045c9a7e72f"), "code" : "005129", "name" : "zengwenfeng" }
>
> db.shutdownServer()
shutdown command only works with the admin database; try 'use admin'
>
> use admin
switched to db admin
>
> db.shutdownServer()
2023-08-05T17:23:00.363+0800 I NETWORK [thread1] Socket recv() 远程主机强迫关闭了一个现有的连接。 127.0.0.1:27017
2023-08-05T17:23:00.381+0800 I NETWORK [thread1] SocketException: remote: (NONE):0 error: 9001 socket exception [RECV_ERROR] server [127.0.0.1:27017]
server should be down...
2023-08-05T17:23:00.444+0800 I NETWORK [thread1] trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed
2023-08-05T17:23:05.445+0800 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017 after 5000ms milliseconds, giving up.
2023-08-05T17:23:05.449+0800 I NETWORK [thread1] reconnect 127.0.0.1:27017 (127.0.0.1) failed failed
>
>
> exit
bye
C:\MongoDB\Server\3.4\bin>
C:\MongoDB\Server\3.4\bin>
C:\MongoDB\Server\3.4\bin>mongo
MongoDB shell version v3.4.24
connecting to: mongodb://127.0.0.1:27017
2023-08-05T17:24:51.875+0800 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017 after 5000ms milliseconds, giving up.
2023-08-05T17:24:51.876+0800 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:240:13
@(connect):1:6
exception: connect failed
C:\MongoDB\Server\3.4\bin>net stop MongoDB
没有启动 MongoDB 服务。
请键入 NET HELPMSG 3521 以获得更多的帮助。
C:\MongoDB\Server\3.4\bin>net start MongoDB
MongoDB 服务正在启动 ..
MongoDB 服务已经启动成功。
C:\MongoDB\Server\3.4\bin>
MongoDB SQL
spencer_tseng2023-08-10 16:11
相关推荐
m0_748233885 分钟前
SQL语句整理五-StarRocksdrebander4 小时前
SQL 实战-巧用 CASE WHEN 实现条件分组与统计18号房客5 小时前
高级sql技巧进阶教程Dawnㅤ5 小时前
使用sql实现将一张表的某些字段数据存到另一种表里黄金右肾5 小时前
Qt之数据库使用(十四)摇滚侠6 小时前
oracle 加字段和字段注释 sql爱编程的鱼6 小时前
Java基本查询(四)天之涯上上6 小时前
JAVA开发Erp时日志报错:SQL 当 IDENTITY_INSERT 设置为 OFF 时,不能为表 ‘***‘ 中的标识列插入显式值一勺菠萝丶10 小时前
MongoDB 常用操作指南(Docker 环境下)lucky_syq11 小时前
Hive SQL和Spark SQL的区别?