Z
Z
ZAndrew2021-08-08 11:57:23
MongoDB
ZAndrew, 2021-08-08 11:57:23

Raise the database from a dump made on another machine?

Hello,
I ran into the following problem - when trying to raise a database dump on Linux, taken from another Windows machine,
using the command:

mongorestore --port <portnumber> --username admin --password <pass> --authenticationDatabase admin --db <DbName> <DbDumpDir>

I get the following error in response:
error connecting to host: could not connect to server: connection() error occured during connection handshake: auth error: unable to authenticate using mechanism "SCRAM-SHA-256": (AuthenticationFailed) Authentication failed.
.
The admin user in both databases is identical:
{
        "_id" : "admin.admin",
        "user" : "admin",
        "db" : "admin",
        "roles" : [
                {
                        "role" : "root",
                        "db" : "admin"
                }
        ],
        "mechanisms" : [
                "SCRAM-SHA-1",
                "SCRAM-SHA-256"
        ]
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question