Hi 26285235,
1.Confirm the Authentication Mechanism
- Your URI uses SCRAM-SHA-1 by default. However, some MongoDB Atlas clusters (or Azure-hosted MongoDB instances) may require SCRAM-SHA-256.
Try explicitly specifying the mechanism:
mongodump --uri="mongodb+srv://allseated:******@mongodb.dev.as-cluster.co/?authMechanism=SCRAM-SHA-256&tls=false" --db=test --out /Users/massefa/Desktop/mongodump/2025-05-27T13:35:56.128-0400
2.Double-Check the Password
Even though mongosh works, ensure:
- The password is not URL-encoded in the URI.
- If it contains special characters (like @, :, /, etc.), they must be percent-encoded in the URI.
For example, if your password is DGWFHy9IzNECPpv4!, encode it as:
DGWFHy9IzNECPpv4%21
3.Try Using --username and --password Separately
Instead of embedding credentials in the URI, try:
mongodump --host="mongodb.dev.as-cluster.co" --username="allseated" --password="DGWFHy9IzNECPpv4" --authenticationDatabase="admin" --db=test --out /Users/massefa/Desktop/mongodump/2025-05-27T13:35:56.128-0400
4.Check IP Whitelisting and Network Access
- Ensure your current IP is allowed in the MongoDB instance’s network access settings (especially if hosted on Azure Cosmos DB or MongoDB Atlas).
5.Validate TLS Settings
- If your cluster enforces TLS, setting tls=false might be causing the issue. Try removing it or setting tls=true.
Kindly request you to please review the answer and do let us know if you have any further concerns. we are happy to help you.
If all your queries are addressed, please do accept the answer.