admin管理员组

文章数量:1130349

问题

使用MongoDB Database Tools导出数据时报错:
执行的命令是:

mongoexport -h 1.20.13.14:6000 --authenticationDatabase=admin -u root --password 'dada%26bibi' -d app -c test -o D:\test.json

connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism “SCRAM-SHA-256”: (AuthenticationFailed) Authentication failed.

原因

可能是密码中带有特殊字符导致的,虽然已经将&转换成了%26

解决办法

使用uri方式连接数据库

mongoexport --uri="mongodb://root:dada%26bibi@1.20.13.14:6000/app" -c test -o D:\test.json

问题

使用MongoDB Database Tools导出数据时报错:
执行的命令是:

mongoexport -h 1.20.13.14:6000 --authenticationDatabase=admin -u root --password 'dada%26bibi' -d app -c test -o D:\test.json

connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism “SCRAM-SHA-256”: (AuthenticationFailed) Authentication failed.

原因

可能是密码中带有特殊字符导致的,虽然已经将&转换成了%26

解决办法

使用uri方式连接数据库

mongoexport --uri="mongodb://root:dada%26bibi@1.20.13.14:6000/app" -c test -o D:\test.json

本文标签: Conversationunablesaslautherror