[quote]
C:\Program Files\MongoDB\Server\3.4\bin>mongo
MongoDB shell version v3.4.9
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.9
Server has startup warnings:
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten]
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-14T14:40:00.910+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-07-14T14:40:00.913+0800 I CONTROL [initandlisten]
2018-07-14T14:40:00.916+0800 I CONTROL [initandlisten] Hotfix KB2731284 or later update is not installed, will zero-out data files.
2018-07-14T14:40:00.918+0800 I CONTROL [initandlisten]
> db.person.insert({"name":"jack","age":20})
WriteResult({ "nInserted" : 1 })
> db.person.insert({"name":"joe","age":25})
WriteResult({ "nInserted" : 1 })
> db.person.find()
{ "_id" : ObjectId("5b499bf8609ba4eb523c879a"), "name" : "jack", "age" : 20 }
{ "_id" : ObjectId("5b499c0a609ba4eb523c879b"), "name" : "joe", "age" : 25 }
[/quote]
[quote]
C:\Program Files\MongoDB\Server\3.4\bin>mongod --dbpath=c:\mongodb\db
2018-07-14T14:40:00.291+0800 I CONTROL [initandlisten] MongoDB starting : pid=28472 port=27017 dbpath=c:\mongodb\db 64-bit host=USER-20151123OX
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] db version v3.4.9
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] git version: 876ebee8c7dd0e2d992f36a848ff4dc50ee6603e
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016
2018-07-14T14:40:00.293+0800 I CONTROL [initandlisten] allocator: tcmalloc
2018-07-14T14:40:00.293+0800 I CONTROL [initandlisten] modules: none
2018-07-14T14:40:00.293+0800 I CONTROL [initandlisten] build environment:
2018-07-14T14:40:00.297+0800 I CONTROL [initandlisten] distmod: 2008plus-ssl
2018-07-14T14:40:00.299+0800 I CONTROL [initandlisten] distarch: x86_64
2018-07-14T14:40:00.301+0800 I CONTROL [initandlisten] target_arch: x86_64
2018-07-14T14:40:00.304+0800 I CONTROL [initandlisten] options: { storage: { dbPath: "c:\mongodb\db" } }
2018-07-14T14:40:00.313+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=5519M,session_max=20000,eviction=(threads_min=4,thread
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten]
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-14T14:40:00.910+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
[/quote]
C:\Program Files\MongoDB\Server\3.4\bin>mongo
MongoDB shell version v3.4.9
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.9
Server has startup warnings:
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten]
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-14T14:40:00.910+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-07-14T14:40:00.913+0800 I CONTROL [initandlisten]
2018-07-14T14:40:00.916+0800 I CONTROL [initandlisten] Hotfix KB2731284 or later update is not installed, will zero-out data files.
2018-07-14T14:40:00.918+0800 I CONTROL [initandlisten]
> db.person.insert({"name":"jack","age":20})
WriteResult({ "nInserted" : 1 })
> db.person.insert({"name":"joe","age":25})
WriteResult({ "nInserted" : 1 })
> db.person.find()
{ "_id" : ObjectId("5b499bf8609ba4eb523c879a"), "name" : "jack", "age" : 20 }
{ "_id" : ObjectId("5b499c0a609ba4eb523c879b"), "name" : "joe", "age" : 25 }
[/quote]
[quote]
C:\Program Files\MongoDB\Server\3.4\bin>mongod --dbpath=c:\mongodb\db
2018-07-14T14:40:00.291+0800 I CONTROL [initandlisten] MongoDB starting : pid=28472 port=27017 dbpath=c:\mongodb\db 64-bit host=USER-20151123OX
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] db version v3.4.9
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] git version: 876ebee8c7dd0e2d992f36a848ff4dc50ee6603e
2018-07-14T14:40:00.292+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016
2018-07-14T14:40:00.293+0800 I CONTROL [initandlisten] allocator: tcmalloc
2018-07-14T14:40:00.293+0800 I CONTROL [initandlisten] modules: none
2018-07-14T14:40:00.293+0800 I CONTROL [initandlisten] build environment:
2018-07-14T14:40:00.297+0800 I CONTROL [initandlisten] distmod: 2008plus-ssl
2018-07-14T14:40:00.299+0800 I CONTROL [initandlisten] distarch: x86_64
2018-07-14T14:40:00.301+0800 I CONTROL [initandlisten] target_arch: x86_64
2018-07-14T14:40:00.304+0800 I CONTROL [initandlisten] options: { storage: { dbPath: "c:\mongodb\db" } }
2018-07-14T14:40:00.313+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=5519M,session_max=20000,eviction=(threads_min=4,thread
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten]
2018-07-14T14:40:00.909+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-14T14:40:00.910+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
[/quote]