Can't create backup mongodump with --db. Authentication failed

后端 未结 14 977
深忆病人
深忆病人 2020-12-29 18:22

When I create backup of all databases in MongoDB (version 3):

mongodump --username bacUser --password 12345

It\'s OK. But when I try to cre

14条回答
  •  萌比男神i
    2020-12-29 18:34

    work with this:

    --authenticationDatabase admin
    

    mongodump and mongorestore commands need the name of database where mongodb user's credentials are stored. (thanks @Zubair Alam)

提交回复
热议问题