mongodb-win32-x86_64-2008plus-ssl-3.6.23-signed.msi

复制代码
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>cd C:\MongoDB\Server\3.6\bin

C:\MongoDB\Server\3.6\bin>
C:\MongoDB\Server\3.6\bin>
C:\MongoDB\Server\3.6\bin>mongod --dbpath C:\MongoDB\Server\3.6\data\db --logpath C:\MongoDB\Server\3.6\data\log --logappend
2023-08-05T10:35:55.658+0800 F CONTROL  [main] Failed global initialization: FileNotOpen: logpath "C:\MongoDB\Server\3.6\data\log" should name a file, not a directory.

C:\MongoDB\Server\3.6\bin>mongod --dbpath C:\MongoDB\Server\3.6\data\db --logpath C:\MongoDB\Server\3.6\data\log\log.txt --logappend
复制代码
2023-08-05T10:36:29.398+0800 I CONTROL  [initandlisten] MongoDB starting : pid=2504 port=27017 dbpath=C:\MongoDB\Server\3.6\data\db 64-bit host=USER-20211009IT
2023-08-05T10:36:29.398+0800 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] db version v3.6.23
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2s-fips  28 May 2019
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] allocator: tcmalloc
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] modules: none
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] build environment:
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten]     distmod: 2008plus-ssl
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten]     distarch: x86_64
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2023-08-05T10:36:29.399+0800 I CONTROL  [initandlisten] options: { storage: { dbPath: "C:\MongoDB\Server\3.6\data\db" }, systemLog: { destination: "file", logAppend: true, path: "C:\MongoDB\Server\3.6\data\log\log.txt" } }
2023-08-05T10:36:29.448+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=1535M,cache_overflow=(file_max=0M),session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2023-08-05T10:36:29.548+0800 I STORAGE  [initandlisten] WiredTiger message [1691202989:548588][2504:1991586816], txn-recover: Set global recovery timestamp: 0
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] 
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] 
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server. 
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP 
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] 
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] Hotfix KB2731284 or later update is not installed, will zero-out data files.
2023-08-05T10:36:29.667+0800 I CONTROL  [initandlisten] 
2023-08-05T10:36:29.727+0800 I STORAGE  [initandlisten] createCollection: admin.system.version with provided UUID: 31d6d754-8c05-4815-8963-e2d01c002d54
2023-08-05T10:36:29.822+0800 I COMMAND  [initandlisten] setting featureCompatibilityVersion to 3.6
2023-08-05T10:36:29.867+0800 I STORAGE  [initandlisten] createCollection: local.startup_log with generated UUID: f8158fb0-3927-45ed-9431-bdd0ef46553a
2023-08-05T10:36:31.172+0800 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/MongoDB/Server/3.6/data/db/diagnostic.data'
2023-08-05T10:36:31.174+0800 I NETWORK  [initandlisten] listening via socket bound to 127.0.0.1
2023-08-05T10:36:31.174+0800 I NETWORK  [initandlisten] waiting for connections on port 27017
2023-08-05T10:36:31.174+0800 I STORAGE  [LogicalSessionCacheRefresh] createCollection: config.system.sessions with generated UUID: 248b146c-31f8-4d71-8612-58e87292341a
2023-08-05T10:36:31.262+0800 I INDEX    [LogicalSessionCacheRefresh] build index on: config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 }
2023-08-05T10:36:31.262+0800 I INDEX    [LogicalSessionCacheRefresh] 	 building index using bulk method; build may temporarily use up to 500 megabytes of RAM
2023-08-05T10:36:31.265+0800 I INDEX    [LogicalSessionCacheRefresh] build index done.  scanned 0 total records. 0 secs
2023-08-05T10:38:32.966+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61740 #1 (1 connection now open)
2023-08-05T10:38:32.967+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61741 #2 (2 connections now open)
2023-08-05T10:38:33.222+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61742 #3 (3 connections now open)
2023-08-05T10:38:33.674+0800 I NETWORK  [conn1] Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection. Ending connection from 127.0.0.1:61740 (connection id: 1)
2023-08-05T10:38:33.674+0800 I NETWORK  [conn1] end connection 127.0.0.1:61740 (2 connections now open)
2023-08-05T10:38:42.081+0800 I NETWORK  [conn2] Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection. Ending connection from 127.0.0.1:61741 (connection id: 2)
2023-08-05T10:38:42.081+0800 I NETWORK  [conn2] end connection 127.0.0.1:61741 (1 connection now open)
2023-08-05T10:38:42.084+0800 I NETWORK  [conn3] Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection. Ending connection from 127.0.0.1:61742 (connection id: 3)
2023-08-05T10:38:42.084+0800 I NETWORK  [conn3] end connection 127.0.0.1:61742 (0 connections now open)
2023-08-05T10:38:42.390+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61778 #4 (1 connection now open)
2023-08-05T10:38:42.391+0800 I NETWORK  [conn4] Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection. Ending connection from 127.0.0.1:61778 (connection id: 4)
2023-08-05T10:38:42.391+0800 I NETWORK  [conn4] end connection 127.0.0.1:61778 (0 connections now open)
2023-08-05T10:38:42.646+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61779 #5 (1 connection now open)
2023-08-05T10:38:47.995+0800 I NETWORK  [conn5] Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection. Ending connection from 127.0.0.1:61779 (connection id: 5)
2023-08-05T10:38:47.995+0800 I NETWORK  [conn5] end connection 127.0.0.1:61779 (0 connections now open)
2023-08-05T10:38:48.302+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61788 #6 (1 connection now open)
2023-08-05T10:38:48.303+0800 I NETWORK  [conn6] Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection. Ending connection from 127.0.0.1:61788 (connection id: 6)
2023-08-05T10:38:48.303+0800 I NETWORK  [conn6] end connection 127.0.0.1:61788 (0 connections now open)
2023-08-05T10:38:48.562+0800 I NETWORK  [listener] connection accepted from 127.0.0.1:61789 #7 (1 connection now open)
2023-08-05T10:40:04.717+0800 I NETWORK  [conn7] end connection 127.0.0.1:61789 (0 connections now open)

It looks like you are trying to access MongoDB over HTTP on the native driver port.

虽然有上面的警告,其实已经可以了

复制代码
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>cd C:\MongoDB\Server\3.6\bin

C:\MongoDB\Server\3.6\bin>
C:\MongoDB\Server\3.6\bin>
C:\MongoDB\Server\3.6\bin>mongo
MongoDB shell version v3.6.23
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("92d9f81a-f168-413d-b5e3-3946a58b4ca6") }
MongoDB server version: 3.6.23
Server has startup warnings:
2023-08-05T13:24:56.273+0800 I CONTROL  [initandlisten]
2023-08-05T13:24:56.273+0800 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2023-08-05T13:24:56.273+0800 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2023-08-05T13:24:56.273+0800 I CONTROL  [initandlisten]
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server.
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten]
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten] Hotfix KB2731284 or later update is not installed, will zero-out data files.
2023-08-05T13:24:56.274+0800 I CONTROL  [initandlisten]
>
> db
test
>
>
> 1+2>
...
... ^C

> 1+2
3
>
>
>
相关推荐
刘晨鑫120 小时前
MongoDB数据库应用
数据库·mongodb
爬山算法1 天前
MongoDB(92)什么是变更流(Change Streams)?
数据库·mongodb
小冯不疯1 天前
旺店通与金蝶云星空入库单管理对接方案
mongodb
MongoDB 数据平台2 天前
为编码代理引入 MongoDB 代理技能和插件
数据库·mongodb
忍冬行者2 天前
MongoDB 三节点副本集离线部署运维手册
运维·数据库·mongodb
卢傢蕊3 天前
MongoDB
数据库·mongodb
翻斗包菜3 天前
【MongoDB 从入门到实战:安装、配置、CRUD、权限、备份恢复全教程】
数据库·mongodb
leo__5203 天前
51单片机实现读写U盘
嵌入式硬件·mongodb·51单片机
为什么要做囚徒3 天前
MongoDB 设置开机自启
数据库·mongodb
炸炸鱼.3 天前
MongoDB 数据库应用完整手册
数据库·mongodb