I can not allow mongo from a remote connection

I connect to a remote mongo server using "mongo xx.xx.xx.xxx:27017"

It does not cause problems. but when trying to authenticate using db.auth ({username, password}) it gives 0.

But when I go to this remote machine and run the local client there and try auth. It works great.

Please, help. what could be the problem

+4
source share
1 answer

My suggestion is that you forgot to run "use admin" or "use" before running the db.auth command.

0
source

Source: https://habr.com/ru/post/1524467/


All Articles