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"}