Use of MongoDB in py

Source: Internet
Author: User
Tags win32

First, installation

This I also do according to other people to do, reference to http://blog.csdn.net/IT_wanghe/article/details/53884229.

Download in the official website is not a hassle, is unable to download, after registering the account directly with the cloud, or unable to download. Then find a download path for Windows.

Http://dl.mongodb.org/dl/win32/x86_64

I downloaded a mongodb-win32-x86_64-2008plus-v3.2-latest.zip. After decompression, change the folder name into MongoDB. Build the folder under it data, build the folder DB and log under Data, build the file in log MongoDB.log

Open the command line, cut to the MongoDB path, enter: Mongod-dbpath "C:\mongodb\data\db" will knock things down into the DB folder. The default port for the database is 27017: So enter http://127.0.0.1:27017 in the Web page

See the result:

It looks like you is trying to access MongoDB over HTTP on the native driver port.


Second, start
Double-click Mongod.exe in Bin, then double-click Mongo.exe, the Console Interface (command line interface) will appear, now do the test
Type db. foo. Insert ({A:1}) (insert a,1 field value to Foo table, and Foo table as the default table)
Typing db. foo. Find (view foo table data)

Use of MongoDB in py

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.