Mongodb Atlas: not authorized on admin to execute command

前端 未结 9 1920
情书的邮戳
情书的邮戳 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:30

    One other cause of this error is being logged in as a different user than the one who started the bad op -- to use db.killOp you need to be logged into the mongo shell as the same user who started the operation.

    On Atlas, database users can utilize the db.killOp() command to kill their own operations. You are correct that an account with atlasAdmin privileges cannot kill operations on the cluster that were not initiated by that account.

    If you authenticate in the mongo shell with the user that the application used to initiate the offending operations, you should then be able to use db.killOp() to kill said operations.

    (source is atlas support ticket)

提交回复
热议问题