Knowledge Dependence:
Before reading the text, you need to understand the concepts and differences between the basic relational database and the non-relational (NoSQL) database, as well as the simple practices of MongoDB (Mongoose).
?Over
MongoDB After the installation of the default is not to turn on The Auth module, ordinary users and super-administrators are not certified to operate. Of course, the bare-Ben risky, security or open the auth module. First, you need to understand the
Note that MongoDB's role is created and configured for later useBrief introductionReplica Set , Chinese translation is called a copy set, but I don't like translating English into Chinese, it always feels strange. In fact, in short, the cluster
Linux under the mongodb installation and data import and export tutorial# View linux release numberCat/etc/issue# View linux kernel versionUname-rI,Linux under The general steps of MongoDB installation1. Download the installation package for your
1. Install MongoDB.1. Import the public key for the package management system. Ubuntu software package management tool to ensure package consistency and reliability requires a GPG key to verify the package. Use the following command to import
Official website article, compare SQL and MongoDBhttp://docs.mongodb.org/manual/reference/sql-comparison/
DB--Displays the currently used library
Show DBS--Display all libraries
Use DB
Show Collections--Show all tables in the
MongoDB 3.0 Security Access controlMongoDB3.0 permission, nothing to say, Google Baidu out of all is wrong. Install the blind ditch first, simply can't say.First, start MongoDB without using the –auth parameter:
Mongodb-linux-i686-3.0
Csdn's Markdown editor is really bad enough, this article is lost againEnable authenticationMongod boot is not enabled by default, you need to specify –auth boot. or set the Security.authorization to "enabled" in the configuration file.Create userdb.
One to one relationship: Embed, such as the user information collection has an address field, the Address field has three fields of province, city and county. The modeling is as follows:650) this.width=650; "class=" Fit-image "title=" QQ2012072519004
MongoDB General Installation1. First to the official website (http://www.mongodb.org/downloads) Download the appropriate installation package, the current version is 2.6Installation package has zip and MSI format, it is recommended to download the
mongodb3.x version has a lot of new features, about this reference website can ...mongodb3.x configuration file using Yaml format, and Salt and ansible format as drop, haha ...Download mongodb3.2 version[Email protected] ~]# wget
1: Replica Set configuration reference this blog:Http://www.cnblogs.com/xiaoit/p/4478951.html2: Authentication of replica setSuppose there are two machines that have been configured with a replica set (the crime of replica set is generally at least 3
1. Db.serverstatus () See Shard Performance InformationDb.serverstatus (). connections; Shards view the number of client connections, Mongod and MONGOs connections are long connections"Connections": {"Current": 737,--the currently active connection
First, queryFind methodDb.collection_name.find ();Query all the results:select * from Users;Db.users.find ();Specifies that those columns (keys) are returned:Select name, skills from users;Db.users.find ({}, {' name ': 1, ' Skills ':
Upgrading MongoDB to 2.6Prepare for upgrade1. Connect the 2.6 MONGO shell to the 2.4 replica set secondary member and execute Db.upgradecheckalldbs () in the admin library.2. Evaluate application compatibility issues for upgrade to 2.6, refer to:
MongoDB Write attentionMongoDB provides write attention to the level of assurance used to describe the return information of a database write operation. The intensity of the written attention determines the level of assurance. When inserting,
MongoDB Learning Note 03– query expressionNot equal to, greater than, less than
! =: Db.stu.find ({name:{$ne: ' billvsme '}}) name is not ' billvsme '
>: Db.stu.find ({age:{$gt:18}}) older than 18
$lt:18}}) older than 18
>=:
MongoDB Common Commands Summary
simple additions and deletions to check the dataSpecify the display or not display a field in the query resultsFor example, we want to find all the data in the lessons collection, but we do not want to
Enable authenticationMongod boot is not enabled by default, you need to specify –auth boot, or set Security.authorization to "enabled" in the configuration fileCreate userDb.createuser (user, Writeconcern)
Document
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.