MongoDB is a product between a relational database and a non-relational database. Installation configuration is simple, installation documentation:
http://guang1689.blog.51cto.com/10320522/1715153
The main point here is MongoDB master-slave exception, when the master-slave environment is built successfully, if from the server log error:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/76/8F/wKioL1ZWg_DQL0WpAABpKOhn6H0922.png "title=" QQ picture 20151125184336.png "alt=" Wkiol1zwg_dql0wpaabpkohn6h0922.png "/>
Workaround: Go to the MongoDB database and execute the following command,
>use Local; #进入本地库
>db.adduser (' Repl ', ' repl '); #创建普通用户认证, both master and slave certification.
If after authentication, still unsuccessful, the log error is not changed, then check whether the firewall and SELinux are open or rules.
-----Turn off firewall, SELinux, or add rules.
MongoDB is not properly shut down, start MongoDB again successfully, but entry is error:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/76/90/wKiom1ZWhXaRzM_0AABYW0Vo6u8182.jpg "title=" QQ picture 20151126115108.jpg "alt=" Wkiom1zwhxarzm_0aabyw0vo6u8182.jpg "/>
Workaround: Delete the Mongod.sock file and execute the command mongod--repair
Then restart MongoDB
This article from the "Operation and maintenance of the road" blog, declined to reprint!
A brief talk on MongoDB common mistakes