安装mongoDB,输入mongod命令后提示如下消息

2019-11-30T13:28:05.812+0800 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-11-30T13:28:05.817+0800 I  CONTROL  [initandlisten] MongoDB starting : pid=3521 port=27017 dbpath=/data/db 64-bit host=qingchens-Mac-mini.local
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten] db version v4.2.1
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten] git version: edf6d45851c0b9ee15548f0f847df141764a317e
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten] allocator: system
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten] modules: enterprise
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten] build environment:
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten]     distarch: x86_64
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten]     target_arch: x86_64
2019-11-30T13:28:05.818+0800 I  CONTROL  [initandlisten] options: {}
2019-11-30T13:28:05.818+0800 I  STORAGE  [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-11-30T13:28:05.818+0800 I  STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7680M,cache_overflow=(file_max=0M),session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
2019-11-30T13:28:06.219+0800 I  STORAGE  [initandlisten] WiredTiger message [1575091686:219860][3521:0x10f4b85c0], txn-recover: Recovering log 5 through 6
2019-11-30T13:28:06.247+0800 I  STORAGE  [initandlisten] WiredTiger message [1575091686:247099][3521:0x10f4b85c0], txn-recover: Recovering log 6 through 6
2019-11-30T13:28:06.283+0800 I  STORAGE  [initandlisten] WiredTiger message [1575091686:283682][3521:0x10f4b85c0], txn-recover: Main recovery loop: starting at 5/6528 to 6/256
2019-11-30T13:28:06.335+0800 I  STORAGE  [initandlisten] WiredTiger message [1575091686:335592][3521:0x10f4b85c0], txn-recover: Recovering log 5 through 6
2019-11-30T13:28:06.367+0800 I  STORAGE  [initandlisten] WiredTiger message [1575091686:367233][3521:0x10f4b85c0], txn-recover: Recovering log 6 through 6
2019-11-30T13:28:06.393+0800 I  STORAGE  [initandlisten] WiredTiger message [1575091686:393890][3521:0x10f4b85c0], txn-recover: Set global recovery timestamp: (0,0)
2019-11-30T13:28:06.419+0800 I  RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2019-11-30T13:28:06.422+0800 I  STORAGE  [initandlisten] Timestamp monitor starting
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten]
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten]
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server.
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
2019-11-30T13:28:06.422+0800 I  CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
2019-11-30T13:28:06.423+0800 I  CONTROL  [initandlisten]
2019-11-30T13:28:06.423+0800 I  CONTROL  [initandlisten]
2019-11-30T13:28:06.423+0800 I  CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2019-11-30T13:28:06.424+0800 I  SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2019-11-30T13:28:06.424+0800 I  STORAGE  [initandlisten] Flow Control is enabled on this deployment.
2019-11-30T13:28:06.425+0800 I  SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>
2019-11-30T13:28:06.425+0800 I  SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2019-11-30T13:28:06.425+0800 I  SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>
2019-11-30T13:28:06.425+0800 I  FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2019-11-30T13:28:06.426+0800 I  SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2019-11-30T13:28:06.426+0800 I  NETWORK  [initandlisten] Listening on /tmp/mongodb-27017.sock
2019-11-30T13:28:06.426+0800 I  NETWORK  [initandlisten] Listening on 127.0.0.1
2019-11-30T13:28:06.426+0800 I  NETWORK  [initandlisten] waiting for connections on port 27017
2019-11-30T13:28:06.426+0800 I  SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version: <unsharded>
2019-11-30T13:28:07.004+0800 I  SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>

看网上的帖子,都是提示 waiting for connections on port xxxx

我这样算是正确的安装了吗

阅读 9.9k
4 个回答

你好,请问这个问题解决了吗,我也遇到了相似的问题,运行mongod命令时卡在I SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>这里,后面运行mongo命令显示 [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: ����Ŀ�����������ܾ����޷����ӡ� :
在stackOverflow上也有人提出这个问题,还没有人解决。
https://stackoverflow.com/que...

2020.2.15更新
在B站上看到一个弹幕大神的一句话提示了我,在运行了mongod命令之后,系统输出的日志会停在I SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>,这时不要关闭这个命令行窗口在bin目录下打开另一个powershell,运行mongo命令,可以成功运行MongoDB。

新手上路,请多包涵

不算是安装好了

装好了啊
$ mongo
应该可以进去

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题