问题
使用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条)