MongoDB Error Solution

Source: Internet
Author: User

Problem Description:

Because the MongoDB database is not used for some time, there is a problem today, after entering the MongoDB database, execute show DBS and other commands basically will appear an error, as follows:

MongoDB Enterprise > Show dbs;
2018-05-19t12:05:01.313+0800 E QUERY [thread1] error:listdatabases failed:{
"OK": 0,
"ErrMsg": "Not authorized on Admin to execute command {listdatabases:1.0, $db: \" admin\ "}",
"Code": 13,
"codename": "Unauthorized"
} :
[Email protected]/mongo/shell/utils.js:25:13
[Email protected]/mongo/shell/mongo.js:65:1
[Email protected]/mongo/shell/utils.js:820:19
[Email protected]/mongo/shell/utils.js:710:15
@ (SHELLHELP2): 1:1

I do not know where the specific fault, see the error like permissions, but according to some of the permissions on the internet to solve, no use.

Finally, my MongoDB installation step is according to Baidu Https://jingyan.baidu.com/article/ d5c4b52bef7268da560dc5f8.html, I'll delete the data and log data, reestablish the new file, and reinstall the service. The premise is that you must shut down the database first. This will solve the problem.

MongoDB Error Solution

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.