Mongodb connection to local mongodb installation

the following link is for connection to mongodb cloud

Is it possible to connect to mongodb local installation?

I tried to install it, create user and password, but it shows "faulted" after setup.
I can use the same setup on mongodb compass to connect.

Is there any actual error in your gateway logs?

If you're using MongoDB locally, make sure that you've created the target database first. You'll likely need to insert some data in order for it to be created. I used mongosh to perform this bootstrapping in the example below:

1 Like

I imported this example database from the following web link, and created multiple users.
(MongoDB Queries - Google Drive)
I have tried all users and different database, none of them work.

I will follow your video and have another try.


Didn't find any error log.

I had a try again.

  1. I installed a mongodb instance on the machine
  2. I downloaded mongosh
  3. I created a db called "gfg", and inserted a few document.
  4. I created a user "root", password "password" under "gfg" db.
  5. I created a new mongo connector.
  6. but it is still showing faulted.
  7. I am testing it using maker edition. does it matter?
  8. I tried the same connection Hosts as in the video "mongo", it didn't work either.
  9. The port 27017 is open.
  10. there's no alarm in the logs.
  11. I can run some python script to retrieve the values.

Not sure what is the next step from ignition part?

I think I found the problem.

The created user has to be under "admin" database.

  1. I created a user "root" under "gfg" database, I can use the set credential to login mongo compass, but not the mongoDB connector.
  2. I created a user "root1" under "admin" database, I can login both the mongo compass and the mongoDB connector in Ignition with this credential.