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
相关推荐
Jacky(易小天)1 小时前
MongoDB比较查询操作符中英对照表及实例详解莫叫石榴姐2 小时前
数据科学与SQL:组距分组分析 | 区间分布问题安迁岚3 小时前
【SQL Server】华中农业大学空间数据库实验报告 实验三 数据操作安迁岚3 小时前
【SQL Server】华中农业大学空间数据库实验报告 实验九 触发器Loganer3 小时前
MongoDB分片集群搭建安迁岚4 小时前
【SQL Server】华中农业大学空间数据库实验报告 实验六 视图乌啼霜满天2495 小时前
JDBC编程---Javahummhumm6 小时前
第 28 章 - Go语言 Web 开发入门武子康6 小时前
Java-07 深入浅出 MyBatis - 一对多模型 SqlMapConfig 与 Mapper 详细讲解测试Rverdoser7 小时前
Linux环境开启MongoDB的安全认证