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

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.

主站蜘蛛池模板: 齐河县| 永胜县| 南江县| 奉节县| 玛曲县| 台江县| 墨脱县| 深圳市| 潢川县| 公主岭市| 玉环县| 灵石县| 水城县| 长兴县| 丰宁| 郴州市| 辉南县| 昭苏县| 奎屯市| 黄石市| 定兴县| 汉阴县| 江阴市| 彰化市| 揭西县| 竹北市| 威远县| 南皮县| 长岭县| 德清县| 曲靖市| 台安县| 雅安市| 诏安县| 满城县| 新昌县| 长垣县| 民和| 股票| 海原县| 南丹县|