華為雲 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