Mongodb Atlas: not authorized on admin to execute command

前端 未结 9 1961
情书的邮戳
情书的邮戳 2021-02-12 18:08

I have a MongoDB Atlas cluster within which I am trying to simply copy a database within the same instance. Unfortunately, every time I try to run db.copyDatabase() or copydb ad

9条回答
  •  無奈伤痛
    2021-02-12 18:29

    In my case I had this issue while trying to connect to mongodb atlas.I removed the error by removing these from the mongdb uri string . ssl=true&replicaSet=Cluster0-shard-0&authSource=admin&retryWrites=true

    Original link : mongodb+srv://username:password@hostname/dbname?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin&retryWrites=true

    After rectification : mongodb+srv://username:password@hostname/dbname

提交回复
热议问题