Failed:error connecting to DB Server:server returned error on SASL authentication Step:authentica

Source: Internet
Author: User
Tags json mongodb mongodump

One: Problem description

When backing up, error:

[root@ser6-51 ~]# mongodump-d mytest-o/backup/mongodb/all_bak_20150619.bak-u=superuser-p=123456

2015-06-29t10:17:10.784+0800 Failed:error connecting to DB Server:server returned error on SASL authentication Step:aut Hentication failed. II: Solutions

Add--authenticationdatabase Admin

Such as:

[root@ser6-51 mongodb]# mongodump-d mytest-o/backup/mongodb/all_bak_20150619.bak-u superuser-p=123456--authenticat Iondatabase Admin

2015-06-29t10:24:21.427+0800 Writing myTest.system.indexes to/backup/mongodb/all_bak_20150619.bak/mytest/ System.indexes.bson

2015-06-29t10:24:21.428+0800 Writing mytest.t To/backup/mongodb/all_bak_20150619.bak/mytest/t.bson

2015-06-29t10:24:21.428+0800 Writing Mytest.t2 To/backup/mongodb/all_bak_20150619.bak/mytest/t2.bson

2015-06-29t10:24:21.429+0800 Writing mytest.t Metadata to/backup/mongodb/all_bak_20150619.bak/mytest/ T.metadata.json

2015-06-29t10:24:21.429+0800 Writing MYTEST.T2 Metadata to/backup/mongodb/all_bak_20150619.bak/mytest/ T2.metadata.json

2015-06-29t10:24:21.468+0800 Done Dumping MYTEST.T2

2015-06-29t10:24:21.468+0800 Done Dumping MYTEST.T

--Note: When specifying a password, you must add ' = Password ' after-p, otherwise error: Error parsing command line options:expected argument for flag '-p,--password '


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.