MongoDB assertion:18 {code:18, ok:0.0, errmsg: "Auth Fails"}

Source: Internet
Author: User
Tags auth

assertion:18 {code:18, ok:0.0, errmsg: "Auth Fails"}


MongoDB 2.4.10 uses the Xucy administrator account under the Admin database to export the data and verify the failure.

# mongoexport-uxucy-p-D test-c pro-f _id,sk2,sk3-o/data/var/log/mongodb/pro.json connected to:127.0.0.1 Enter password:assertion:18 {code:18, ok:0.0, errmsg: "Auth Fails"}


Workaround:

This is 2.2.2 after the release, reference: https://jira.mongodb.org/browse/SERVER-9991


Validation parameters need to be added:

--authenticationdatabase Admin


Similar commands are Mongodump, Mongorestore, Mongoexport, Mongoimport

# Mongoexport--authenticationdatabase admin-uxucy-p-D test-c pro-f _id,sk2,sk3-o/data/var/log/mongodb/pro.json C onnected to:127.0.0.1 Enter password:exported 564097 Records


This article is from the SQL Server deep dives blog, so be sure to keep this source http://ultrasql.blog.51cto.com/9591438/1658881

MongoDB assertion:18 {code:18, ok:0.0, errmsg: "Auth Fails"}

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.