1, first, to MongoDB official website http://www.mongodb.org/downloads download the corresponding installation package, such as: My own version of the download
2. Establish MongoDB folders and Mongodbdata folders on disk, as shown below:
3, the
According to the previous section, "Building a highly available MongoDB cluster (iii)--in-depth replica set" after the establishment of two problems are not resolved: from the node each of the above data is a full copy of the database, from the node
MongoDB and MySQL, each update of MySQL will be directly written to the hard disk, but MONGO will not, as a memory database, data operations will be written to the memory, and then to persist to the hard drive, then MONGO how to persist it?
At
First, the database commonly used commands1. Help View command PromptCopy code code as follows: HelpDb.help ();Db.yourColl.help ();Db.youColl.find (). Help ();Rs.help ();2. Switch/CREATE DatabaseCopy code code as follows: Use YOURDB; The current
Recently the project has been using MongoDB as a database, MongoDB has his advantage, the document type JSON format to store data, modified than the traditional relational database more convenient, but recently in MongoDB with the query slow problem,
MongoDB Start Stop methodThe official website installs the introduction to still have the way that starts to stop1 startsudo service Mongod start2 stopsudo service Mongod stop3 restartsudo service mongod restart4 Viewing statussudo service Mongod
The first part of Windows installation MongoDB-4.0First step: Download mongodb:https://www.mongodb.com/download-center?jmp=nav#communityI am currently using the version Mongodb-win32-x86_64-2008plus-ssl-4.0.1-signed.msiStep two: Download the
Basic Data Types)
1. null
Can be used to indicate null and non-existent fields (field)
Eg: {"X",: NULL}
2. Boolean)
Like the Boolean Type in Java, there are only two values: 'true' or 'false'
Eg: {"X", true}
3. 32-bit integer (32-bit integer)
Some time ago, the dbref in MongoDB was not very clear, and it was in a hurry because of time. Add a small experiment here.As MongoDB is non-relational (no joins), references ("Foreign keys") between parameters are generally resolved client-side by
1. Download the python driver of MongoDB.
2. Create a New py script (you can install the pydev plug-in eclipse, which is very convenient)
# Coding = UTF-8Import pymongoConnection = pymongo. Connection ("192.168.0.101", 27017)DB = connection.
It was frustrating last night that a tested program reported a link failure after upgrading to the latest MongoDB 2.4 C ++ driver. It's not easy.
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libmongoclient.a(log.o): In function
This is the automatic deployment of the standalone version. For manual deployment, refer to my other article:
Http://blog.csdn.net/sheismylife/article/details/6737127
First download the mongodb-linux-x86_64-2.2.0.tgz, decompress it and put it under
1) download MongoDBHttp://downloads.mongodb.org/win32/mongodb-win32-i386-2.0.4.zip
2) set the MongoDB directory
Decompress it to D: \ and rename it to MongoDB. The path is D: \ MongoDB.
3) set the data file path
Create a data folder in D: disk and
The example below is a test in small data. I tried to test tens of millions of data records on a single machine. I haven't finished the test for a long time...
Data has a table: crawler. Videos. The table structure is: _ id, playurl,
Address: http://www.mongodb.org/display/DOCS/Windows+Service
On Windows, cmdd.exe supports local installation and operation of Windows Services.
Service commands
Service-related Commands include:JS Code
Mongod -- install
Mongod -- service
Download
The easiest way to install MongoDB is to use compiled binary files.
Note: We recommend that you use the 64-bit version (although you must use a 64-bit system to run this version ).
Download 32-bit Binaries
Download 64-bit Binaries
Extract
This article by larrylgq prepared, reproduced please note the Source: http://blog.csdn.net/larrylgq/article/details/7395261
Author: Lu guiqiang
Email: larry.lv.word@gmail.com
MongoDB adds user authentication: adds users, deletes users,
If you want to talk about MongoDB, you must first talk about nosql. About nosql, two articles on the Internet are recommended: 1. http://www.iteye.com/topic/524977 by Fan Kai. This article details the background of nosql and the analysis of
MongoDB is a product between relational databases and non-relational databases. It has the most abundant functions and features like relational databases. The supported data structure is very loose and is similar to the JSON bjson format.
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