auth error: sasl conversation error: unable to authenticate using mechanism “SCRAM-SHA-256“:

问题使用MongoDB Database Tools导出数据时报错:执行的命令是:mongoexport -h 1.20.13.14:6000 --authenticationDatabas

问题

使用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

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754604167a5181318.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信