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

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.

主站蜘蛛池模板: 长宁区| 华蓥市| 赣榆县| 盘山县| 云浮市| 新乐市| 浮山县| 磴口县| 临泉县| 广饶县| 临桂县| 大埔区| 大化| 辽源市| 安泽县| 尚志市| 阿鲁科尔沁旗| 芒康县| 双鸭山市| 宁海县| 延寿县| 营山县| 巨野县| 澳门| 镇康县| 元阳县| 舒城县| 哈巴河县| 封丘县| 水城县| 扎兰屯市| 滦平县| 泸溪县| 乃东县| 贵德县| 新疆| 灵丘县| 通海县| 共和县| 绥德县| 商南县|