The IP address configuration in the replica set needs to be modified because the virtual machine address is occupied and the IP address needs to be reset:1: View configuration rs.config (), need to locate primary host, have permission to modify
Yesterday colleagues installed MongoDB encountered some problems, asked me, after pull found are some details did not pay attention to (reason it should be very simple, a good operation on the OK thing)First, download the MONGO package,Then, unzip
MongoDB 3.x stores binary data in a way that is not base64, although the query results in the MONGO client are displayed in base64 manner, please feel free to use. The following analysis stores the contents of the stored file. Base64 encoded data
Here are some of the basic concepts of MongoDB:
A document is a basic unit of data in MongoDB, similar to a row in a relational database.
Collection, which is a container for storing documents, similar to a table in a relational
MongoDB for real-time locationDb. Callrecordinfo.find (). Count ()Db. Sendinfo.find (). Count ()Db. Riderreatimepositon.find (). Count ()Db. Distributeorderrecord.find (). Count ()Data that is greater than a certain timeDb. Riderreatimepositon.find (
Cluster authenticationIntroduction: We introduced the single strength of the certification method, just I am engaged in Lepus monitoring, replica collection requires user authenticationA verification method:1 Auth mode start = "Single point"2
1. Install after unpacking the installation packageInstallation Note: 1. Select Customs 2. Path Select a drive letter other than C driveAfter the installation is complete:2. Create a new data, log folder in the bin's sibling directory3. Create a new
Method/Step
Login to MongoDB official dot click on the right side of the download
Select the Windows platform and click on the zip file you need to download (I am here to install the main complaint zip file)The legacy version can be used for
Dbref:There are two ways to model MongoDB, one is inline (Embed), and the other is connection (link). Inline is a good understanding, that is, the field content is a group, the array contains the document, and we are today to introduce another,
1. First download the Community edition from Https://www.mongodb.com/download-center#community, and the Enterprise Edition is similar.2. Double-click to run the installation, you can customize the installation path, which takes the default path
Aggregation Pipeline:Common operators introduce:$project: Include, exclude, rename, and display fields$match: query, need the same parameters as find ()$limit: Limit the number of results$skip: Ignore the number of results$sort: Sort results by a
Tag:mongodb monitor The MONGODBMMS monitoring item opcounters: currently has an operation to execute the command (Command,query,update,delete,gemore, Insert) Number of connections : currently active connections to this server. Each
Manual Pre-sharding:Purpose: Manual pre-sharding is intended to prevent future chunk movement and reduce IO.Sh.shardcollection ("Shop.users", {"UserId": 1})for (var i=1; iInsert data for validation:for (var i=1; iFrom the above, the data is evenly
Show DBS View all databasesShow Tables View all collectionsdb Displays the current databaseuse+name switches to the specified database and creates a new if it does not existA document is a set of key-value (Key-value) pairs (that is, Bson). MongoDB
Index:#查看执行计划Db.stu.find (). explain ();#创建索引 (records without this column also create an index)Db.bar.ensureIndex ({content:1})#查看索引Db.bar.getIndexes ()#删除索引Db.bar.dropIndex ({content:1})#创建多列索引Db.bar.ensureIndex ({content:1,
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