MongoError: user is not allowed to do action

前端 未结 6 507
[愿得一人]
[愿得一人] 2021-02-05 10:29

I am using MongoDB Atlas as my database.

I am using angular4 with loopback as api.

My application connects to my database fine. However, when I try to get data,

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 10:40

    I had the same error myself.

    • If you are using v.3.0 of the MongoDB NodeJS driver refer to MikaS post for the MongoClient.connect changes that need to be made. https://stackoverflow.com/a/47662979/8775223

    • To connect your application to Atlas MongoDB use the 3.4 driver eg.

      mongodb://:@cluster0-shard-00-00-
      rb899.mongodb.net:27017,cluster0-shard-00-01-
      rb899.mongodb.net:27017,cluster0-shard-00-02-
      rb899.mongodb.net:27017/?ssl=true&replicaSet=Cluster0-shard-
      0&authSource=admin
      

提交回复
热议问题