well yes I didn’t gave the real username in the forum, but here is the real username and password: mongodb+srv://dbuser:dbuser@boursogame-9eaqw.mongodb.net/test?retryWrites=true&w=majority
I didn’t know we could connect without username/pswd. But I can’t connect with or without the password ^^. This is really weird because on other computers I can connect. Here is my code:
const {MongoClient} = require(‘mongodb’);
const uri = “mongodb+srv://dbuser:dbuser@boursogame-9eaqw.mongodb.net/test?retryWrites=true&w=majority”;
async function Main(){
let client = new MongoClient(uri);
await client.connect().then(()=> console.log(“DB connected”));
client.connection.on('error', function(error) {
console.error('Database connection error:', error);
});
}
Main();