|
[root@mongo-test config]# mongo --port 27017
MongoDB shell version: 3.2.3
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2016-03-05T22:40:23.212+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2016-03-05T22:40:23.212+0800 I CONTROL [initandlisten]
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten]
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten]
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-03-05T22:40:23.213+0800 I CONTROL [initandlisten]
> show dbs;
local 0.000GB
> use zxl;
switched to db zxl
> db.test.insert({name:"haha",age:18})
WriteResult({ "nInserted" : 1 })
> db.test.find()
{ "_id" : ObjectId("56daf1eacfaf29514f85d236"), "name" : "haha", "age" : 18 }
|
|
|