官术网_书友最值得收藏!

Connecting to MongoDB

In order to be able to interact with a MongoDB instance, we first need to be sure that our server is running it. Then, we can access it through the Mongo shell application. In Chapter 1, Setting Up Your Workspace, we covered in some detail how to install and get MongoDB running on your specific operating system. You should go through these steps if you have not done so already. Once you have verified that MongoDB is running, open the MongoDB shell for your operating system.

Linux and Mac OS X

Start a console and run the following:

mongo

Windows

Start your command prompt and run the following:

C:\mongodb\bin\mongo.exe

You will see a prompt starting with the > character. From here, we can issue commands to MongoDB interactively and read the resulting output.

主站蜘蛛池模板: 年辖:市辖区| 莆田市| 南澳县| 宁陕县| 衡阳县| 胶州市| 镇平县| 白山市| 鲁甸县| 彰化县| 石首市| 福鼎市| 甘德县| 五大连池市| 静乐县| 台中县| 西平县| 林西县| 仲巴县| 贺兰县| 盐边县| 贺兰县| 通榆县| 喀喇| 伊宁县| 大竹县| 弥渡县| 焦作市| 遵义县| 上思县| 通化市| 景泰县| 南平市| 张北县| 安乡县| 黎平县| 平昌县| 青海省| 施甸县| 加查县| 贡山|