我已经想出了如何做到这一点,只需 cd 在 AMPPS 文件夹中:
cd /usr/local/ampps/mongodb/bin
然后运行:
./mongo
你会得到这样的东西:
MongoDB shell version: 3.2.0
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-10-04T09:08:12.567+0330 I CONTROL [main] ** WARNING: --rest is specified without --httpinterface,
2016-10-04T09:08:12.567+0330 I CONTROL [main] ** enabling http interface
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten]
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten]
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten]
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-10-04T09:08:38.127+0330 I CONTROL [initandlisten]
>
如您所见,您可以在>
like 前面键入命令:
> show dbs
admin 0.078GB
local 0.078GB
mydb 0.078GB
>