A brief talk on MongoDB common mistakes

Source: Internet
Author: User

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

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.