Can not connect to MongoDB on cloud from metabase (Add Database form). But connect successed by MongoDb Compass with the same connection string

Hi Team,

I want to add new database in Metabase with data type is MongoDb (MongoDb is on cloud).

And this is my set up on Add Database form in Metabase:

Metabase can not connect to MongoDn atlas on cloud. And it throw the error :

"hmm, we couldn't connect to the database. Make sure your host and port settings are correct"

But i try connect with the same connection string info by Mongo Compass and then it can connect succesful.

*Note :

Do someone know how to fix this issue?
Please help!

Thanks in advance!

@thienanlk
Have you seen these two old issues, where people have commented various ways they made it work?
https://github.com/metabase/metabase/issues/6678
https://github.com/metabase/metabase/issues/9867

tks for your help!

I am facing the exact same problem, tried all the options given above- didnt work for me. is there a way out?