华为云 mongodb 4.0.3 报无法使用sasl协议机制SCRAM-SHA-256进行身份验证 问题解决访问


 

 

华为云 mongodb 4.0.3 mongodb diver 2.12.4 c# 代码连接,连接字符串密码包含%,因阿里云控制台提示修改密码可以包含:特殊字符% #

但代码连接会报: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-256. 无法使用sasl协议机制SCRAM-SHA-256进行身份验证 这个信息

MongodbConnectString": "mongodb://rwuser:7Jb322OwB#Wk6%C@ip:8635",

 

navicat p 客户端连接mongodb不会报这个错误

 

 

删除集合的脚本:
use("colltest");
db.getCollectionNames().forEach(function(ColName){
var re1=new RegExp(".*_BizLog$");
var re2=new RegExp(".*_Listing$");
if(!re1.test(ColName)&&!re2.test(ColName))
{
return;
}

print(db[ColName]);
});

 

1、删除colltest库下以"_BizLog."和“_Listing.”开头的集合

M_Express_Listing_BizLog
Ap_Publish_Wish_Listing


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM