I'm trying to connect to my mongodb atlas cluster while following the documentation but it gave me an Error connecting to the Mongo database. Incomplete key value pair for option
.
{
"defaultConnection": "default",
"connections": {
"default": {
"connector": "mongoose",
"settings": {
"uri": "mongodb://vafflehauz:Vafflehauz312**?@company-shard-00-00-qreis.mongodb.net:27017,company-shard-00-01-qreis.mongodb.net:27017,company-shard-00-02-qreis.mongodb.net:27017/test?ssl=true&replicaSet=company-shard-0&authSource=admin&retryWrites=true&w=majority"
},
"options": {
"ssl": true
}
}
}
}
Here`s my config/development/database.json.
I'm using strapi 3.0.0-beta version
Thanks to Joe Drumgoole for pointing out my password was the issue and now it works.
The question mark in your password is being interpreted as an option in the URI. try using %3F in its place. – Joe Drumgoole
"uri": "mongodb://vafflehauz:Vafflehauz312**%3F@company-shard-00-00-qreis.mongodb.net:27017,company-shard-00-01-qreis.mongodb.net:27017,company-shard-00-02-qreis.mongodb.net:27017/test?ssl=true&replicaSet=company-shard-0&authSource=admin&retryWrites=true&w=majority"